[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Calendar Days - EZ Lang.



PureBytes Links

Trading Reference Links

At 04:02 PM 02/12/02, Robert Marley wrote:
>Could anyone suggest a method using EZ Language to
>count calendar days in a system (as opposed to trading
>days).  
>
>Is there a function I could use, or is there a way to
>use an exisiting function to accomplish this?
>
>In advance, thanks.
>
>-RNM


This is what the DateToJulian and JulianToDate functions are for. Look these up in the EasyLanguage Reference materials.

The Julian date is a big integer that represents a day on a timescale. All days are numbered consecutively from Julian Day 0, which began on January 1, 4713 B.C.

The advantage of Julian Dates is you can do arithmetic with them. So, convert your dates to Julian with DateToJulian, e.g., DateToJulian(960408) = 35163. Then subtract to count calendar days.

HTH

Mike Gossland