next up previous index
Next: text_lines Up: Miscellaneous Previous: ask   Index

Time and date

In time.diesel:

The date_info object provides hygienic access to the current_time function. A new date_info representing the current time is returned by the date function; a date_info object for a given time is constructed by the new_date_info method. Many aspects of the current time and date can be queried; the _shortname versions return 3-letter abbreviations of their _name equivalents. The numbers returned are zero-based (i.e., January is month 0 and Sunday is day 0). The print_string output for a date_info object is identical to the output of the Unix date command.

extend module Stdlib;
module TimeAndDate;
let earliest_time:integer;
let latest_time:integer;
fun int_time_to_integer_time(t:int):integer;
fun integer_time_to_int_time(t:integer):int;
fun integer_time_to_int_time(t:integer, if_error:&(string):int):int;
fun current_time():integer;
fun real_time(cl:&():void):int;
class date_info isa comparable[date_info];
  fun new_date_info(time:integer):date_info;
  fun date():date_info;
  fun seconds(d:date_info):int;
  fun minutes(d:date_info):int;
  fun hours(d:date_info):int;
  fun day_of_month(d:date_info):int;
  fun month_of_year(d:date_info):int;
  fun month_of_year_name(d:date_info):string;
  fun month_of_year_shortname(d:date_info):string;
  fun year(d:date_info):int;
  fun day_of_week(d:date_info):int;
  fun day_of_week_name(d:date_info):string;
  fun day_of_week_shortname(d:date_info):string;
  fun day_of_year(d:date_info):int;
  fun is_daylight_savings_time(d:date_info):bool;
  fun time_zone_name(d:date_info):string;
end module TimeAndDate;


next up previous index
Next: text_lines Up: Miscellaneous Previous: ask   Index

Cecil/Vortex Project