{ "ns" : "http://zorba.io/modules/excel/datetime", "description" : " This is a library module offering the same set of functions\n defined by Microsoft Excel.\n", "sees" : [ "Excel Documentation: Datetime Functions" ], "authors" : [ "Sorin Nasoi" ], "version" : null, "encoding" : "utf-8", "namespaces" : [ { "uri" : "http://zorba.io/modules/excel/datetime", "prefix" : "excel-datetime" }, { "uri" : "http://zorba.io/modules/excel/errors", "prefix" : "excel-err" }, { "uri" : "http://zorba.io/modules/excel/text", "prefix" : "excel-text" }, { "uri" : "http://zorba.io/options/versioning", "prefix" : "ver" } ], "functions" : [ { "arity" : 3, "name" : "date", "qname" : "excel-datetime:date", "signature" : "($year as xs:integer, $month as xs:integer, $day as xs:integer) as xs:date?", "description" : " Constructs a date given the hours, months and days.\n", "summary" : "

Constructs a date given the hours, months and days.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "year", "type" : "xs:integer", "occurence" : null, "description" : "
the year
" }, { "name" : "month", "type" : "xs:integer", "occurence" : null, "description" : "
the month
" }, { "name" : "day", "type" : "xs:integer", "occurence" : null, "description" : "
the day
" } ], "returns" : { "type" : "xs:date?", "description" : "A date given the hours, months and days" }, "errors" : [ ] }, { "arity" : 1, "name" : "day", "qname" : "excel-datetime:day", "signature" : "($date as xs:date) as xs:integer?", "description" : " Returns the day of a $date, represented by a serial number.\n", "summary" : "

Returns the day of a $date, represented by a serial number.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "date", "type" : "xs:date", "occurence" : null, "description" : "
the date.
" } ], "returns" : { "type" : "xs:integer?", "description" : "The day of a $date, represented by a serial number. The day is given as an integer ranging from 1 to 31." }, "errors" : [ ] }, { "arity" : 2, "name" : "days360", "qname" : "excel-datetime:days360", "signature" : "($start_date as xs:date, $end_date as xs:date) as xs:integer", "description" : " Returns the number of days between two dates based on a 360-day year.\n", "summary" : "

Returns the number of days between two dates based on a 360-day year.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "start_date", "type" : "xs:date", "occurence" : null, "description" : "
the start date.
" }, { "name" : "end_date", "type" : "xs:date", "occurence" : null, "description" : "
the end date.
" } ], "returns" : { "type" : "xs:integer", "description" : "The number of days between two dates based on a 360-day year (twelve 30-day months), which is used in some accounting calculations.

Use this function to help compute payments if your accounting system is based on twelve 30-day months.

The metod used is U.S. (NASD). If the starting date is the last day of a month, it becomes equal to the 30th of the same month.

If the ending date is the last day of a month and the starting date is earlier than the 30th of a month, the ending date becomes equal to the 1st of the next month; otherwise the ending date becomes equal to the 30th of the same month." }, "errors" : [ ] }, { "arity" : 3, "name" : "days360", "qname" : "excel-datetime:days360", "signature" : "($start_date as xs:date, $end_date as xs:date, $method as xs:boolean) as xs:integer", "description" : " Returns the number of days between two dates based on a 360-day year.\n", "summary" : "

Returns the number of days between two dates based on a 360-day year.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "start_date", "type" : "xs:date", "occurence" : null, "description" : "
the start date.
" }, { "name" : "end_date", "type" : "xs:date", "occurence" : null, "description" : "
the end date.
" }, { "name" : "method", "type" : "xs:boolean", "occurence" : null, "description" : "
if false then US/NASD Method is used, otherwise the European Method is used.
" } ], "returns" : { "type" : "xs:integer", "description" : "The number of days between two dates based on a 360-day year (twelve 30-day months), which is used in some accounting calculations. Use this function to help compute payments if your accounting system is based on twelve 30-day months.

The European Method (30E/360)

- If either date A or B falls on the 31st of the month, that date will be changed to the 30th;

- Where date B falls on the last day of February, the actual date B will be used.

The US/NASD Method (30US/360)

- If both date A and B fall on the last day of February, then date B will be changed to the 30th.

- If date A falls on the 31st of a month or last day of February, then date A will be changed to the 30th.

- If date A falls on the 30th of a month after applying (2) above and date B falls on the 31st of a month, then date B will be changed to the 30th." }, "errors" : [ ] }, { "arity" : 1, "name" : "hour", "qname" : "excel-datetime:hour", "signature" : "($time as xs:time) as xs:integer?", "description" : " Returns the hour of a time value.\n", "summary" : "

Returns the hour of a time value.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "time", "type" : "xs:time", "occurence" : null, "description" : "
the time.
" } ], "returns" : { "type" : "xs:integer?", "description" : "The hour of a time value. The hour is as an integer, ranging from 0 (12:00 A.M.) to 23 (11:00 P.M.)." }, "errors" : [ ] }, { "arity" : 1, "name" : "minute", "qname" : "excel-datetime:minute", "signature" : "($time as xs:time) as xs:integer?", "description" : " Returns the minutes of a time value.\n", "summary" : "

Returns the minutes of a time value.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "time", "type" : "xs:time", "occurence" : null, "description" : "
the time.
" } ], "returns" : { "type" : "xs:integer?", "description" : "The minutes of a time value. The minute is given as an integer, ranging from 0 to 59." }, "errors" : [ ] }, { "arity" : 1, "name" : "month", "qname" : "excel-datetime:month", "signature" : "($date as xs:date) as xs:integer?", "description" : " Returns the month of a $date.\n", "summary" : "

Returns the month of a $date.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "date", "type" : "xs:date", "occurence" : null, "description" : "
the date.
" } ], "returns" : { "type" : "xs:integer?", "description" : "the month of a $date. The month is given as an integer, ranging from 1 (January) to 12 (December)." }, "errors" : [ ] }, { "arity" : 2, "name" : "networkdays", "qname" : "excel-datetime:networkdays", "signature" : "($start_date as xs:date, $end_date as xs:date) as xs:integer*", "description" : " Returns the number of whole working days between $start_date and $end_date.\n", "summary" : "

Returns the number of whole working days between $start_date and $end_date.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "start_date", "type" : "xs:date", "occurence" : null, "description" : "
the start date.
" }, { "name" : "end_date", "type" : "xs:date", "occurence" : null, "description" : "
the end date.
" } ], "returns" : { "type" : "xs:integer*", "description" : "The number of whole working days between start_date and end_date.

Working days exclude weekends and any dates identified in holidays.

Use NETWORKDAYS to calculate employee benefits that accrue based on the number of days worked during a specific term." }, "errors" : [ ] }, { "arity" : 3, "name" : "networkdays", "qname" : "excel-datetime:networkdays", "signature" : "($start_date as xs:date, $end_date as xs:date, $holidays as xs:date*) as xs:integer*", "description" : " Returns the number of whole working days between $start_date and $end_date.\n", "summary" : "

Returns the number of whole working days between $start_date and $end_date.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "start_date", "type" : "xs:date", "occurence" : null, "description" : "
the start date.
" }, { "name" : "end_date", "type" : "xs:date", "occurence" : null, "description" : "
the end date.
" }, { "name" : "holidays", "type" : "xs:date", "occurence" : null, "description" : "
one or more dates to exclude from the working calendar, such as state and federal holidays and floating holidays.
" } ], "returns" : { "type" : "xs:integer*", "description" : "The number of whole working days between start_date and end_date.

Working days exclude weekends and any dates identified in holidays.

Use NETWORKDAYS to calculate employee benefits that accrue based on the number of days worked during a specific term." }, "errors" : [ ] }, { "arity" : 0, "name" : "now", "qname" : "excel-datetime:now", "signature" : "() as xs:dateTime?", "description" : " Returns the current date and time.\n", "summary" : "

Returns the current date and time.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ ], "returns" : { "type" : "xs:dateTime?", "description" : "The current date and time." }, "errors" : [ ] }, { "arity" : 1, "name" : "second", "qname" : "excel-datetime:second", "signature" : "($time as xs:time) as xs:decimal?", "description" : " Returns the seconds of a $time value.\n", "summary" : "

Returns the seconds of a $time value.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "time", "type" : "xs:time", "occurence" : null, "description" : "
the time.
" } ], "returns" : { "type" : "xs:decimal?", "description" : "The seconds of a $time value. The second is given as an integer in the range 0 (zero) to 59." }, "errors" : [ ] }, { "arity" : 3, "name" : "time", "qname" : "excel-datetime:time", "signature" : "($hour as xs:integer, $minute as xs:integer, $second as xs:integer) as xs:time?", "description" : " Constructs a time given the hours, minutes and seconds.\n", "summary" : "

Constructs a time given the hours, minutes and seconds.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "hour", "type" : "xs:integer", "occurence" : null, "description" : "
the hour.
" }, { "name" : "minute", "type" : "xs:integer", "occurence" : null, "description" : "
the minute.
" }, { "name" : "second", "type" : "xs:integer", "occurence" : null, "description" : "
the second.
" } ], "returns" : { "type" : "xs:time?", "description" : "A time given the hours, minutes and seconds." }, "errors" : [ ] }, { "arity" : 0, "name" : "today", "qname" : "excel-datetime:today", "signature" : "() as xs:date?", "description" : " Returns the current date.\n", "summary" : "

Returns the current date.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ ], "returns" : { "type" : "xs:date?", "description" : "The current date." }, "errors" : [ ] }, { "arity" : 1, "name" : "weekday", "qname" : "excel-datetime:weekday", "signature" : "($date as xs:date) as xs:integer?", "description" : " Returns the day of the week corresponding to a $date.\n", "summary" : "

Returns the day of the week corresponding to a $date.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "date", "type" : "xs:date", "occurence" : null, "description" : "
the date.
" } ], "returns" : { "type" : "xs:integer?", "description" : "The day of the week corresponding to a $date. The day is given as an integer, ranging from 1 (Sunday) to 7 (Saturday)." }, "errors" : [ ] }, { "arity" : 2, "name" : "weekday", "qname" : "excel-datetime:weekday", "signature" : "($date as xs:date, $return_type as xs:integer) as xs:integer?", "description" : " Returns the day of the week corresponding to a $date depending on $return_type.\n", "summary" : "

Returns the day of the week corresponding to a $date depending on $return_type.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "date", "type" : "xs:date", "occurence" : null, "description" : "
the date.
" }, { "name" : "return_type", "type" : "xs:integer", "occurence" : null, "description" : "
1 for Numbers 1 (Sunday) through 7 (Saturday). 2 for Numbers 1 (Monday) through 7 (Sunday). 3 for Numbers 0 (Monday) through 6 (Sunday).
" } ], "returns" : { "type" : "xs:integer?", "description" : "The day of the week corresponding to a $date depending on $return_type." }, "errors" : [ "excel-err:Value if $return_type is outside the range [1,3]." ] }, { "arity" : 1, "name" : "year", "qname" : "excel-datetime:year", "signature" : "($date as xs:date) as xs:integer?", "description" : " Returns the year corresponding to a date.\n", "summary" : "

Returns the year corresponding to a date.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "date", "type" : "xs:date", "occurence" : null, "description" : "
the date.
" } ], "returns" : { "type" : "xs:integer?", "description" : "The year corresponding to a date." }, "errors" : [ ] } ], "variables" : [ ] }