<< Previous Suneido > Contents > Language > Reference > DateNext >> 
Builtin

Date

() => current date
(date) => date
(string, format = "ymd") => date or false
(year:, month:, day:, hour:, minute:, second:, millisecond:) => date or false

Date represents a date and time. Returns false if the date cannot be interpreted.

With no arguments it returns the current date and time.

If passed a string it attempts to interpret it as a date and/or time. Most reasonable formats are handled. For example:

Feb 14 2000
Monday 14 Feb 2000
Feb 14 '00
Feb 14
July 14
0/2/14
60/4/25
4/25/60
7-8-9 3:4:5am
3:04pm 7-8-9
20000303
20000303.1030
20000303.103000

Ambiguous dates such as 7/8/9 are interpreted based on the format argument, for example:

Date("7/8/9", "mdy") => #20090708)

Also:

Note: Date's are immutable like numbers and strings. This means they cannot be modified once they are created.


<< Previous Suneido > Contents > Language > Reference > DateNext >> 
Copyright (C) 2000-2016 Suneido Software Corp. All rights reserved worldwide.