help-glpk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-glpk] Time conversion functions


From: Andrew Makhorin
Subject: Re: [Help-glpk] Time conversion functions
Date: Thu, 20 Nov 2008 21:07:59 +0300

Hi Xypron,

I propose to add to MathProg the following built-in time functions:

localtime()
   Returns the current local calendar time (volatile).

str2time(s, fmt)
   Converts the specified character string s to the calendar time using
   the format control string fmt.

time2str(t, fmt)
   Converts the calendar time t to a character string using the format
   control string fmt.

maketime(int year, int month, int day, int hh, int mm, int ss);
   Converts the broken-down time to the simple calendar time.

Year(t)
   Returns the year number, for example, 2008.

Month(t)
   Returns the month number, from 1 to 12.

Day(t)
   Returns the day of the month, from 1 to 31.

Hour(t)
   Returns the hour, from 0 to 23.

Minute(t)
   Returns the minute, from 0 to 59.

Second(t)
   Returns the second, from 0 to 59.

NOTE: The calendar time is the number of seconds elapsed since
      1970-01-01 00:00:00. It may be positive as well as negative.


Andrew Makhorin





reply via email to

[Prev in Thread] Current Thread [Next in Thread]