132
|
1 /******************************************************************************
|
|
2
|
|
3 Example to format a locale-based time. For a default locale of
|
|
4 en-gb, this examples formats in the following manner:
|
|
5
|
|
6 "Thu, 27 April 2006 18:20:47 +1"
|
|
7
|
|
8 ******************************************************************************/
|
|
9
|
|
10 private import tango.io.Console;
|
|
11
|
|
12 private import tango.time.Clock;
|
|
13
|
|
14 private import tango.text.locale.Locale;
|
|
15
|
|
16 void main ()
|
|
17 {
|
|
18 auto layout = new Locale;
|
|
19
|
|
20 Cout (layout ("{:ddd, dd MMMM yyyy HH:mm:ss z}", Clock.now)).newline;
|
|
21 }
|