]> git.saurik.com Git - cydget.git/blob - PhotoExample.cydget/lcd.cy
Fix permissions (use root) of the packaged files.
[cydget.git] / PhotoExample.cydget / lcd.cy
1 document.write('<div id="lcd">');
2
3 var locale = CFLocaleCopyCurrent();
4 var now = CFDateCreate(NULL, CFAbsoluteTimeGetCurrent());
5 var formatter = CFDateFormatterCreate(NULL, locale, kCFDateFormatterNoStyle, kCFDateFormatterNoStyle);
6 CFRelease(locale);
7
8 CFDateFormatterSetFormat(formatter, UIDateFormatStringForFormatType(UINoAMPMTimeFormat));
9 var time = CFDateFormatterCreateStringWithDate(NULL, formatter, now);
10 document.write('<h1>');
11 document.write(time);
12 document.write('</h1>');
13 CFRelease(time);
14
15 CFDateFormatterSetFormat(formatter, UIDateFormatStringForFormatType(UIWeekdayNoYearDateFormat));
16 var date = CFDateFormatterCreateStringWithDate(NULL, formatter, now);
17 document.write('<h2>');
18 document.write(date);
19 document.write('</h2>');
20 CFRelease(date);
21
22 CFRelease(formatter);
23 CFRelease(now);
24
25 document.write('</div>');