public static int BGL_DATE_YDAY( date d ) { return d.date_time.DayOfYear; }
public static int BGL_DATE_YEAR( date d ) { return d.date_time.Year; }
public static long bgl_date_to_seconds( date d ) { return (long)((d.date_time.Ticks / 1e7) - date.EPOCH_in_seconds); }
public static int BGL_DATE_WDAY( date d ) { return ((int)d.date_time.DayOfWeek + 1); }
public static int BGL_DATE_SECOND( date d ) { return d.date_time.Second; }
public static int BGL_DATE_TIMEZONE( date d ) { return d.timezone; }
public static int BGL_DATE_MONTH( date d ) { return d.date_time.Month; }
public static int BGL_DATE_MINUTE( date d ) { return d.date_time.Minute; }
public static int BGL_DATE_ISDST( date d ) { return -1; }
public static int BGL_DATE_HOUR( date d ) { return d.date_time.Hour; }
public static int BGL_DATE_DAY( date d ) { return d.date_time.Day; }