Project

General

Profile

OpenSpace3D libs
OpenSpace 3D libraries for plugITs and OS3D developer
Loading...
Searching...
No Matches

Functions

 getMonthDays (month, year)
 get the number of day for a month depending of the year
 
 isDateString (date)
 test if a date string is valid
 
 getSecondsFromDateTime (day, month, year, hours, minutes, seconds)
 get the number of seconds from a complete date time
 
 getDateTimeFromString (date)
 get the decomposed date time from a string date
 
 getCurrentDateTime (mode)
 get the current date time
 
 getCurrentTime (mode)
 get the current time
 

Detailed Description

Date tools

Function Documentation

◆ getMonthDays()

getMonthDays ( month  ,
year   
)

get the number of day for a month depending of the year

Prototype: fun [I I] I

Parameters
I: the month
I: the year
Returns
I : the number of days

◆ isDateString()

isDateString ( date  )

test if a date string is valid

Prototype: fun [S] I

Parameters
S: the date in string format ("Tue Jan 21 11:24:53 1997")
Returns
I : 1 if valid, 0 otherwise

◆ getSecondsFromDateTime()

getSecondsFromDateTime ( day  ,
month  ,
year  ,
hours  ,
minutes  ,
seconds   
)

get the number of seconds from a complete date time

Prototype: fun [I I I I I I] I

Parameters
I: the day
I: the month
I: the year
I: the hours
I: the minutes
I: the seconds
Returns
I : the number of seconds from 1970

◆ getDateTimeFromString()

getDateTimeFromString ( date  )

get the decomposed date time from a string date

Prototype: fun [S] [I I I I I I]

Parameters
S: the date in string format ("Tue Jan 21 11:24:53 1997")
Returns
[I I I I I I] : return nil is the input string is not a valid date \I : the day \I : the month \I : the year \I : the hours \I : the minutes \I : the seconds

◆ getCurrentDateTime()

getCurrentDateTime ( mode  )

get the current date time

Prototype: fun [I] [I I I I I I]

Parameters
I: 0 or nil for local time, 1 for GMT
Returns
[I I I I I I] : \I : the day \I : the month \I : the year \I : the hours \I : the minutes \I : the seconds

◆ getCurrentTime()

getCurrentTime ( mode  )

get the current time

Prototype: fun [I] [I I I]

Parameters
I: 0 or nil for local time, 1 for GMT
Returns
[I I I] : \I : the hours \I : the minutes \I : the seconds