Project

General

Profile

OpenSpace3D libs
OpenSpace 3D libraries for plugITs and OS3D developer

Functions

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

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 : the day : the month : the year : the hours : the minutes : 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] : : the day : the month : the year : the hours : the minutes : 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] : : the hours : the minutes : the seconds