106
C H A P T E R 5
Scripting
%a
Abbreviated weekday name (e.g., Thu)
%A
Full weekday name (e.g., Thursday)
%b
Abbreviated month name (e.g., Sep)
%B
Full month name (e.g., September)
%c
Date and time (e.g., 09/24/09 23:57:10)
%d
Day of the month (e.g., 24)
%H
Hour, 24-hour clock (e.g., 23)
%I
Hour, 12-hour clock (e.g., 11)
%M
Minute (e.g., 57)
%m
Month (01 = January, e.g., 09)
%p
Either “am” or “pm” (e.g., pm)
%S
Second (e.g., 10)
%w
Weekday (0 = Sunday, e.g., 4)
%x
Date (e.g., 09/24/09)
%X
Time (e.g., 23:57:10)
%Y
Full year (e.g., 2009)
%y
Two-digit year (e.g., 09)
%%
The character ‘%’ when used as a literal
For example:
s = os.date("today, %B %d, %Y")
returns
"today, September 24, 2009"
A special case is the format string
‘*t’
. In this case, the
date()
function
returns date and time in the form of a table, as seen in the discussion of the
time()
function.
In addition to the above functions, the CHDK implementation provides
some more functions that are not part of the standard
Lua
OS library
(which implements only those OS functions that are part of ANSI C). Con-
sequently, scripts utilizing those functions cannot be tested on another
platform such as a PC, except with an appropriate OS extension library
(section 5.8).
Summary of Contents for Camera
Page 1: ......
Page 2: ...The Canon Camera Hackers Manual ...
Page 3: ......
Page 4: ...Berthold Daum The Canon Camera Hackers Manual Teach Your Camera New Tricks ...
Page 19: ...10 CH APTER 2 Cameras and Operating Systems ...
Page 25: ...16 CH APTER 3 ...
Page 85: ...76 CH APTER 4 Teach Your Camera New Tricks ...
Page 213: ...204 CH APTER 6 ...
Page 253: ...244 AP PENDIX ...