Created
February 12, 2015 20:04
-
-
Save michaeloffner/7c02d34625d10853fea7 to your computer and use it in GitHub Desktop.
locales and timezone
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<cfscript> | |
// outputs a data with a specifc locale and a specific timezone | |
regionals={ | |
"Europe/Zurich":"de_ch", | |
"America/Los_Angeles":"en_us", | |
"Australia/Perth":"en_au", | |
"Asia/Ho_Chi_Minh":"vi_VN", | |
"Asia/Shanghai":"zh_CN" | |
}; | |
loop struct="#regionals#" index="timezone" item="locale" { | |
dump( | |
label:"What's the time in #timezone.replace('_',' ','all').listLast('/')#", | |
var:lsDateTimeFormat(date:now(),locale:locale,timezone:timezone,mask:"long")); | |
} | |
// some roman numbers maybe | |
dump( | |
label:'We write the year', | |
var:numberFormat(now().year(),"roman")); | |
</cfscript> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment