]> git.saurik.com Git - cydget.git/blame - PhotoExample.cydget/lcd.cy
Just in case, cancel menu action when menu is held.
[cydget.git] / PhotoExample.cydget / lcd.cy
CommitLineData
89afbf46
JF
1document.write('<div id="lcd">');
2
3var locale = CFLocaleCopyCurrent();
4var now = CFDateCreate(NULL, CFAbsoluteTimeGetCurrent());
5var formatter = CFDateFormatterCreate(NULL, locale, kCFDateFormatterNoStyle, kCFDateFormatterNoStyle);
6CFRelease(locale);
7
8CFDateFormatterSetFormat(formatter, UIDateFormatStringForFormatType(UINoAMPMTimeFormat));
9var time = CFDateFormatterCreateStringWithDate(NULL, formatter, now);
10document.write('<h1>');
11document.write(time);
12document.write('</h1>');
13CFRelease(time);
14
15CFDateFormatterSetFormat(formatter, UIDateFormatStringForFormatType(UIWeekdayNoYearDateFormat));
16var date = CFDateFormatterCreateStringWithDate(NULL, formatter, now);
17document.write('<h2>');
18document.write(date);
19document.write('</h2>');
20CFRelease(date);
21
22CFRelease(formatter);
23CFRelease(now);
24
25document.write('</div>');