Biferno 1.7 Tabasoft.it

Application: ItaliaScuola Back-Office3
Reference
Admin | Edit | Reference | Cache | Logs
Click on a class name to see the description of that particular class:

Predefined Classes

ansi
array
biferno
boolean
cacheItem
char
classInfo
client
collection
curApp
curFile
curScript
db
double
error
file
folder
header
httpPage
imageUtils
int
long
memberInfo
multipart
object
ref
regexp
request
search
serverInfo
smtp
stackItem
string
time
unix
unsigned
 

Application Classes

Banner
BrowserBar
Ctrl_Form
FCKeditor
Form
GridChartGraph
Histogram
LocalDate
Result
condb
cookie
folderExt
headerExt
httpExt
mysqlFulltext
objHtml
requestExt
tableExport
utils
 

Functions

Functions

time

Method:

Strftime

string Strftime(string format)

Time string formatting

Description:

This methods returns a string containing date and time formatted on the base of the specific format descriptor passed with the format parameter.

Table below lists all descriptors that can be used with the Strftime method together with their meaning.

Each descriptor consists in a percent symbol followed by a lowercase or uppercase letter. Any other text in the format string is not interpreted and is returned unaltered. A percent sign in the format string must be escaped by using a percent sign in front of it.

The following script shows how to use the Strftime method and format descriptors.

now = time()
print(now.Strftime("%a %B %d, %Y ore %X") + "<br>\n")
print(now.Strftime("%d-%m-%y %X") + "<br>\n")
print(now.Strftime("%d/%m/%Y %I:%M %p") + "<br>\n")
print(now.Strftime("%x (day %j of the year)") + "<br>\n")
print(now.Strftime("%a %b %d/%y (%W-th week)") + "<br>\n")

This script, run at 15:50 on 30/7/2001, generated the following output:

Mon July 30, 2001 ore 15:50:20
30-07-01 15:50:20
30/07/2001 03:50 pm
Monday July 30 2001 (day 211 of the year)
Mon Jul 30/01 (31-th week)

Parameters:
format

the format of the resulting string

Notes:

The following table lists all possible descriptors that can be contained in the string format (and the values they are replaced by):

%a	Abbreviated name of day of the week
%A	Complete name of day of the week
%b	Abbreviated name of month (also obtained with ‘%h’)
%B	Complete name of month
%c	Date and time in standard format
%d	Day of the month as an integer number
%H	Time in 24-hour format (from 00 to 23)
%I	Time in 12-hour format (from 01 to 12)
%j	Day of the year as an integer number (from 001 to 365)
%m	Month as an integer number (from 01 to 12)
%M	Minutes in decimal format
%p	The AM or PM string, depending on the time
%S	Seconds in decimal format
%U	Week of the current year as an integer number (the first
		week of the year starts with the first 
		Sunday of the year)
%W	Week of the current year as an integer number (the first
		week of the year starts with the first 
		Monday of the year
%w	Day of the year as an integer number (from 0 to 6)
%x	Date in standard format
%X	Time in standard format
%y	Year with two digits
%Y	Year with four digits
%Z	The time zone or the standard abbreviation 
		for the time zone 

Implementation:
C
 

Return to the time class