Next: , Up: The Date And Time Library   [Index]


13.9.1 Date Functions

d_3_day

text d_3_day(date d);

is the three characters abbreviation of the name of the d day of the week, one of ‘Sun’, ‘Mon’, ‘Tue’, ‘Wed’, ‘Thu’, ‘Fri’ and ‘Sat

d_3_month

text d_3_month(date d);

is the three characters abbreviation of the name of the d month of the year, one of ‘Jan’, ‘Feb’, ‘Mar’, ‘Apr’, ‘May’, ‘Jun’, ‘Jul’, ‘Aug’, ‘Sep’, ‘Oct’, ‘Nov’ and ‘Dec

d_add

date d_add(date d, time t);

is d, adds t to d

d_compare

integer d_compare(date d, date e);

is 0 if d is same as e, less than 0 if d is less than e and greater than 0 if d is greater than e

d_copy

date d_copy(date d, date e);

is d, sets d to e

d_d_hour

integer d_d_hour(date d);

is the d hour of the day (0 .. 23)

d_diff

time d_diff(date d, date e);

is the d e difference (the sign of the difference is preserved)

d_fix

date d_fix(date d, integer second, integer microsecond);

is d, sets d to second seconds and microsecond microseconds. The absolute value of microsecond is not restricted to the 0 .. 999999 range.

d_h_minute

integer d_h_minute(date d);

is the d minute of the hour (0 .. 59)

d_m_day

integer d_m_day(date d);

is the d day of the month (1 .. 31)

d_m_second

integer d_m_second(date d);

is the d second of the minute (0 .. 60)

d_microsecond

integer d_microsecond(date d);

is the d microsecond

d_n_day

text d_n_day(date d);

is the name of the d day of the week, one of ‘Sunday’, ‘Monday’, ‘Tuesday’, ‘Wednesday’, ‘Thursday’, ‘Friday’ and ‘Saturday

d_n_month

text d_n_month(date d);

is the name of the d month of the year, one of ‘January’, ‘February’, ‘March’, ‘April’, ‘May’, ‘June’, ‘July’, ‘August’, ‘September’, ‘October’, ‘November’ and ‘December

d_new

void d_new(date &d);

sets d as a new date object (does nothing if d is not linked multiple times, creates a new object and sets d as a reference of that object if it is)

d_now

date d_now(date d);

is d, sets d to the current date

d_off

date d_off(date d, integer s);

is d, adds s seconds to d.

d_offset

date d_offset(date d, integer s, integer m);

is d, adds s seconds and m microseconds to d. The absolute value of m is not restricted to the 0 .. 999999 range.

d_real

real d_real(date d);

is ‘d_second’(d) + ‘d_microsecond’(d) / 1000000

d_resolve

date d_resolve
    (date d, integer year, integer month, integer day, integer hour,
     integer minute, integer second, integer microsecond);

is d, sets d as the year/month/day/hour/minute/second/microsecond broken down year, month, day, hour, minute, second, microsecond aggregate. The fields are not restricted to their normal ranges.

d_s_frame

integer d_s_frame(date d);

is the d frame of the second (0 .. 59) (here frame is the sixtieth part of the second)

d_second

integer d_second(date d);

is the d second

d_set

date d_set(date &d, date h);

is h, sets the d date object as a reference of the h date object

d_solve

date d_solve(date d, integer year, integer month, integer day);

is d, sets d as the year/month/day broken down year, month, day aggregate, with the hour, minute, second and subsecond all 0. The fields are not restricted to their normal ranges. Same as ‘d_resolve’(d, year, month, day, 0, 0, 0, 0).

d_w_day

integer d_w_day(date d);

is the d day of the week, Sunday first (1 .. 7)

d_y_day

integer d_y_day(date d);

is the d day of the year (1 .. 366)

d_y_month

integer d_y_month(date d);

is the d month of the year (1 .. 12)

d_year

integer d_year(date d);

is the d year


Next: Date Constructor Functions, Up: The Date And Time Library   [Index]