org.jclarion.clarion.runtime
Class CDate

java.lang.Object
  extended by org.jclarion.clarion.runtime.CDate

public class CDate
extends java.lang.Object

Clarion date format is number of days since Dec 28 1800. --------------- Valid values start from 4 , Jan 1 1801. Epoch (1.1.1970) = 61730 Assumption is that clarion stored date is localtime based on current timezone location - so epoch conversion will take this into consideration i.e. 1.1.1970 clarion date for me equals 1.1.1970 Midnight Melbourne/Victoria But for someone running software in different TZ, the epoch result will differ Clarion time format --------------- Value = 100ths of seconds since midnight + 1. i.e. midnight = 1 the 100th of a second before midnight = 8640000 Assumption is that clarion time values are wall time only and do not take daylight savings variations into consideration

Author:
barney

Constructor Summary
CDate()
           
 
Method Summary
static java.lang.String age(int c_birthdate, int c_basedate)
           
static long clarionDateToEpoch(int date)
           
static void clarionDateToEpoch(int date, java.util.Calendar c)
           
static int clock()
          Get time of day in clarion format Value = 10ths of seconds since midnight + 1.
static int date(int month, int day, int year)
          Calculate date from supplied gregorian date semantics
static int day(int date)
          Get day (1-31) based on provided date
static int epochToClarionDate(long epoch)
           
static int month(int date)
          Get month (1-12) based on provided date
static int today()
          Get date in clarion format
static int year(int date)
          Get year in yyyy format based on provided date
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CDate

public CDate()
Method Detail

epochToClarionDate

public static int epochToClarionDate(long epoch)

clarionDateToEpoch

public static long clarionDateToEpoch(int date)

age

public static java.lang.String age(int c_birthdate,
                                   int c_basedate)

clarionDateToEpoch

public static void clarionDateToEpoch(int date,
                                      java.util.Calendar c)

today

public static int today()
Get date in clarion format

Returns:

clock

public static int clock()
Get time of day in clarion format Value = 10ths of seconds since midnight + 1. i.e. midnight = 1 the 10th of a second before midnight = 8640000 0 = invalid/null

Returns:

month

public static int month(int date)
Get month (1-12) based on provided date

Parameters:
date -
Returns:

day

public static int day(int date)
Get day (1-31) based on provided date

Parameters:
date -
Returns:

year

public static int year(int date)
Get year in yyyy format based on provided date

Parameters:
date -
Returns:

date

public static int date(int month,
                       int day,
                       int year)
Calculate date from supplied gregorian date semantics

Parameters:
month -
day -
year -
Returns:


Copyright © 2010. All Rights Reserved.