Clib.strftime()
syntax: |
Clib.strftime(str, formatString, timeObj) |
where: |
str - a variable to receive the formatted time string.
formatString - string that specifies the final format.
timeObj - time variable in the Time object format.
|
return: |
string - a string that describes the date and/or time and stores it in the variable string.
|
description: |
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:
• %a • %A • %b • %B • %c • %d • %H • %I • %j • %m • %M • %p • %S • %U • %w • %W • %x • %X • %y • %Y • %Z • %% |
example: |
// displays the full day name and month name // of the current day Clib.strftime(TimeBuf, "Today is: %A, the month is: %B", Clib.localtime(time())); Clib.puts(TimeBuf); |