contents   index   previous   next



Clib.strftime(str, formatString, timeObj)


str - a variable to receive the formatted time string.


formatString - string that specifies the final format.


timeObj - time variable in the Time object format.



string - a string that describes the date and/or time and stores it in the variable string.



This method creates a string that describes the date and or time and stores it in the variable str. The parameter formatString describes what the string will look like, and timeObj is a time object as returned by Clib.localtime().


These following conversion characters are used with Clib.strftime() to indicate time and date output:


abbreviated weekday name (Sun)

full weekday name (Sunday)

abbreviated month name (Dec)

full month name (December)

date and time (Dec 2 06:55:15 1979)

twodigit day of the month (02)

twodigit hour of the 24hour day (06)

twodigit hour of the 12hour day (06)

threedigit day of the year from 001 (335)

twodigit month of the year from 01 (12)

twodigit minute of the hour (55)

AM or PM (AM)

twodigit seconds of the minute (15)

twodigit week of year, Sunday is first day of week (48)

day of the week where Sunday is 0 (0)

twodigit week of year, Monday is first day of week (47)

the date (Dec 2 1979)

the time (06:55:15)

twodigit year of the century (79)

the year (1979)

name of the time zone, if known (EST)

the per cent character (%)


// displays the full day name and month name

// of the current day


              "Today is: %A, the month is: %B",