📄 mtime.mal
字号:
command daytime(h:int,m:int,s:int,mi:int) :daytime address MTIMEdaytime_create comment "creates a time from (hours,minutes, seconds,milliseconds) parameters.";command timestamp(d:date,dt:daytime,t:timezone) :timestamp address MTIMEtimestamp_create comment "creates a timestamp from (date, daytime,timezone) parameters.";command timestamp(d:date,dt:daytime) :timestamp address MTIMEtimestamp_create_default comment "creates a timestamp from (d,dt) parameters (in the local timezone).";command timestamp(d:date) :timestamp address MTIMEtimestamp_create_from_date comment "creates a timestamp from (d,00:00:00) parameters (in the local timezone).";command rule(s:str):zruleaddress MTIMErule_fromstrcomment "create a rule from a string.";command rule (mo:int,d:int,wkday:int,mi:int) :zrule address MTIMErule_create comment "create a DST start/end date rule.";command timezone(s:str):timezone address MTIMEtzone_fromstrcomment "Convert the string to a timezone.";command timezone(s:int):timezone address MTIMEtzone_createcomment "Convert the int to a timezone.";command timezone(s:lng):timezone address MTIMEtzone_createcomment "Convert the int to a timezone.";command timezone(mi:int,s:zrule,erule:zrule):timezone address MTIMEtzone_create_dst comment "create a timezone as an hour difference from GMT and a DST.";#line 519 "/export/scratch0/monet/monet.GNU.64.64.d.14791/MonetDB5/src/modules/atoms/mtime.mx"command year(d:date) :int address MTIMEdate_extract_year comment "extracts year from date (nonzero value between -5867411 and +5867411).";command year(d:bat[:any_1,:date]):bat[:any_1,:int]address MTIMEdate_extract_year_bulk;command month(d:date) :int address MTIMEdate_extract_month comment "extracts month from date";command month(d:bat[:any_1,:date]):bat[:any_1,:int]address MTIMEdate_extract_month_bulk;command day(d:date) :int address MTIMEdate_extract_day comment "extracts day from date ";command day(d:bat[:any_1,:date]):bat[:any_1,:int]address MTIMEdate_extract_day_bulk;command hours(h:daytime) :int address MTIMEdaytime_extract_hours comment "extracts hour from daytime";command hours(d:bat[:any_1,:date]):bat[:any_1,:int]address MTIMEdaytime_extract_hours_bulk;command minutes(d:daytime) :int address MTIMEdaytime_extract_minutes comment "extracts minutes from daytime";command minutes(d:bat[:any_1,:date]):bat[:any_1,:int]address MTIMEdaytime_extract_minutes_bulk;command seconds(d:daytime) :int address MTIMEdaytime_extract_seconds comment "extracts seconds from daytime";command seconds(d:bat[:any_1,:date]):bat[:any_1,:int]address MTIMEdaytime_extract_seconds_bulk;command milliseconds(d:daytime) :int address MTIMEdaytime_extract_milliseconds comment "extracts milliseconds from daytime";command milliseconds(d:bat[:any_1,:date]):bat[:any_1,:int]address MTIMEdaytime_extract_milliseconds_bulk;command daytime(t:timestamp) :daytime address MTIMEtimestamp_extract_daytime_default comment "extracts daytime from timestamp in the local timezone.";command daytime(t:timestamp, v:timezone) :daytime address MTIMEtimestamp_extract_daytime comment "extracts daytime from timestamp in a specific timezone.";command date(t:timestamp) :date address MTIMEtimestamp_extract_date_default comment "extracts date from timestamp in the local timezone.";command date(t:timestamp,v:timezone) :date address MTIMEtimestamp_extract_date comment "extracts date from timestamp in a specific timezone.";command setTimezone(name:str):timezone address MTIMEtimezonecomment "Test and set the timezone.";command start_dst(t:timezone) :zrule address MTIMEtzone_extract_start comment "extract rule that determines start of DST from timezone.";command end_dst(t:timezone) :zrule address MTIMEtzone_extract_end comment "extract rule that determines end of DST from timezone.";command minutes(t:timezone) :int address MTIMEtzone_extract_minutes comment "extract number of minutes that time zone is offset wrt GMT.";# rulecommand month(t:zrule) :int address MTIMErule_extract_month comment "extract month from rule.";command day(t:zrule) :int address MTIMErule_extract_day comment "extract day from rule.";command weekday(t:zrule) :int address MTIMErule_extract_weekday comment "extract weekday from rule.";command minutes(t:zrule) :int address MTIMErule_extract_minutes comment "extract minutes from rule.";#line 622 "/export/scratch0/monet/monet.GNU.64.64.d.14791/MonetDB5/src/modules/atoms/mtime.mx"command addyears(value:date, years:int) :date address MTIMEdate_addyears comment "returns the date after a number of years (possibly negative).";command addmonths(value:date, months:int) :date address MTIMEdate_addmonths comment "returns the date after a number of months (possibly negative).";command adddays(value:date, days:int) :date address MTIMEdate_adddays comment "returns the date after a number of days (possibly negative).";command diff(val1:date, val2:date) :int address MTIMEdate_diff comment "returns the number of days between 'val1' and 'val2'.";command dayofyear(d:date) :int address MTIMEdate_extract_dayofyear comment "Returns N where d is the Nth day of the year (january 1 returns 1)";command weekofyear(d:date) :int address MTIMEdate_extract_weekofyear comment "Returns the week number in the year.";command dayofweek(d:date) :int address MTIMEdate_extract_dayofweek comment "Returns the current day of the week where 1=sunday, .., 7=saturday";command add(v:timestamp, msecs:lng) :timestamp address MTIMEtimestamp_add comment "returns the timestamp that comes 'msecs' (possibly negative) after 'value'.";command diff(val1:timestamp, val2:timestamp) :lng address MTIMEtimestamp_diff comment "returns the number of milliseconds between 'val1' and 'val2'.";command dst(t:timestamp,v:timezone) :bit address MTIMEtimestamp_inside_dst comment "return whether DST holds in the timezone at a certain point of time.";command compute(r:zrule, year:int) :date address MTIMEcompute_rule_foryear comment "compute the date from a rule in a given year";#line 672 "/export/scratch0/monet/monet.GNU.64.64.d.14791/MonetDB5/src/modules/atoms/mtime.mx"command monthnum(month:str) :int address MTIMEmonth_from_str comment "Returns month number [1-12] from a string or nil if does not match any.";command monthname(month:int) :str address MTIMEmonth_to_str comment "Returns month name from a number between [1-12], str(nil) otherwise.";command daynum(day:str) :int address MTIMEday_from_str comment "Returns number of day [1-7] from a string or nil if does not match any.";command dayname(day:int) :str address MTIMEday_to_str comment "Returns day name from a number between [1-7], str(nil) otherwise.";command time_synonyms(allow:bit) address MTIMEsynonyms comment "Allow synonyms for the parse format of date/timestamp.";command olddate (format:str) :date address MTIMEolddate comment "create a date from the old instant format.";command oldduration(format:str) :int address MTIMEoldduration comment "parse the old duration format and return an (estimated) number of days.";#line 706 "/export/scratch0/monet/monet.GNU.64.64.d.14791/MonetDB5/src/modules/atoms/mtime.mx"command msecs(d:int,h:int,m:int,s:int,ms:int):lngaddress MTIMEmsecscomment "convert date components to milliseconds";command daytime(h:int):daytime address MTIMEdaytime1comment "default time with zeroed components";command daytime(h:int,m:int):daytime address MTIMEdaytime2comment "default time with zeroed components";command daytime(h:int,m:int,s:int):daytime address MTIMEdaytime3comment "default time with zeroed components";command current_timestamp():timestampaddress MTIMEcurrent_timestamp;command current_date():dateaddress MTIMEcurrent_date;command current_time():daytimeaddress MTIMEcurrent_time;command year(t:timestamp):int address MTIMEtimestamp_year;command month(t:timestamp):intaddress MTIMEtimestamp_month;command day(t:timestamp):intaddress MTIMEtimestamp_day;command hours(t:timestamp):intaddress MTIMEtimestamp_hours;command minutes(t:timestamp):intaddress MTIMEtimestamp_minutes;command seconds(t:timestamp):intaddress MTIMEtimestamp_seconds;command milliseconds(t:timestamp):intaddress MTIMEtimestamp_milliseconds;command year(months:int):intaddress MTIMEsql_year;command month(months:int):intaddress MTIMEsql_month;command day(secs:lng):intaddress MTIMEsql_day;command hours(secs:lng):intaddress MTIMEsql_hours;command minutes(secs:lng):intaddress MTIMEsql_minutes;command seconds(secs:lng):intaddress MTIMEsql_seconds;command msec():lng address MTIMEmseccomment "get time of day in msec since 1-1-1970.";#line 761 "/export/scratch0/monet/monet.GNU.64.64.d.14791/MonetDB5/src/modules/atoms/mtime.mx"#line 768 "/export/scratch0/monet/monet.GNU.64.64.d.14791/MonetDB5/src/modules/atoms/mtime.mx"command prelude() :voidaddress MTIMEprelude;command epilogue() :voidaddress MTIMEepilogue;mtime.prelude();module calc;command date(s:str):date address MTIMEdate_fromstr;command date(d:date):date address MTIMEdate_date;command date(t:timestamp) :date address MTIMEtimestamp_extract_date_default;command timestamp(s:str):timestamp address MTIMEtimestamp_fromstr;command timestamp(t:timestamp):timestamp address MTIMEtimestamp2timestamp;command timestamp(d:date) :timestamp address MTIMEtimestamp_create_from_date;command daytime(s:str):daytime address MTIMEdaytime_fromstr;command daytime(d:daytime):daytime address MTIMEdaytime2daytime;command daytime(s:lng):daytime address MTIMEsecs2daytime;command daytime(t:timestamp) :daytime address MTIMEtimestamp_extract_daytime_default;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -