1DateTime::Format::IBeatU(s3e)r Contributed Perl DocumentaDtaitoenTime::Format::IBeat(3)
2
3
4

NAME

6       DateTime::Format::IBeat - Format times in .beat notation
7

DESCRIPTION

9           No Time Zones
10
11           No Geographical Borders
12
13           How long is a Swatch .beat? In short, we have divided up the virtual and
14           real day into 1000 I<beats>. One Swatch beat is the equivalent of 1
15           minute 26.4 seconds. That means that 12 noon in the old time system is
16           the equivalent of @500 Swatch .beats.
17
18           Okay, so how can a surfer in New York, or a passenger on a transatlantic
19           flight know when it is @500 Swatch .beats in Central Europe for example?
20           How can the New York surfer make a date for a chat with his cyber friend
21           in Rome? Easy, Internet Time is the same all over the world.
22
23           How is this possible? We are not just creating a new way of measuring
24           time, we are also creating a new meridian in Biel, Switzerland, home of
25           Swatch.
26
27           Biel MeanTime (BMT) is the universal reference for Internet Time. A day
28           in Internet Time begins at midnight BMT (@000 Swatch .beats) (Central
29           European Wintertime). The meridian is marked for all to see on the
30           facade of the Swatch International Headquarters on Jakob-Staempfli
31           Street, Biel, Switzerland. So, it is the same time all over the world,
32           be it night or day, the era of time zones has disappeared.
33
34           The BMT meridian was inaugurated on 23 October 1998 in the presence of
35           Nicholas Negroponte, founder and director of the Massachusetts Institute
36           of Technology`s Media Laboratory.
37
38           - http://www.swatch.com/itime_tools/itime.php
39

PARSING METHODS

41       parse_time
42
43       Parses a .beat time and returns a DateTime object.  The object uses the
44       current date for its date and will have UTC set as its timezone. Feel
45       free to use 'set' to convert to your local time.
46
47           my $first = DateTime::Format::IBeat->parse_time( '@765' );
48           print $first->datetime; # 2003-04-01T17:21:36
49
50           $first->set_time_zone( "Australia/Sydney" );
51           print $first->datetime; # 2003-04-02T03:21:36
52
53       Note that the leading @ is optional. Also, if using direct strings, and
54       leading @s, be careful to not have it interpolate it as an array by
55       accident.
56
57       parse_date
58
59       Parses an .beat date and returns a "DateTime" object representing that
60       date.
61
62            my $dt = DateTime::Format::IBeat->parse_date('@d01.04.03');
63            print $dt->ymd('.'); # "2003.04.01"
64
65       Note: this assumes the number of .beats elapsed in the day to be 0,
66       thus it will appear to be returning the day before. If you display a
67       full time with it, you will find it's at UTC rather than BMT (+0100),
68       thus 11pm the day before. The important thing to remember is that it is
69       an accurate conversion to the usual notation, despite appearances.
70
71       parse_datetime
72
73       Parses an ibeat datetime string and returns a "DateTime" object repreā€
74       senting that datetime.
75
76           my $dt = DateTime::Format::IBeat->parse_datetime(
77               '@d01.04.03 @765');
78           print $dt->datetime; # "2003-04-01T17:21:36"
79

FORMATTING METHODS

81       format_time
82
83       Given a DateTime object, returns a string representating that time in
84       ibeats.
85
86       format_date
87
88       Given a DateTime object, returns a string representating that date.
89
90       format_datetime
91
92       Given a Datetime object, returns a string representating that date and
93       time in .beats format.
94

THANKS

96       The original author of this module was Iain Truskett (SPOON). Since his
97       tragically early death, the module has been maintained by Earle Martin
98       (EMARTIN), who would like to dedicate it to his memory.
99
100       Iain wished to thank:
101
102       * Dave Rolsky (DROLSKY) for kickstarting the DateTime project.
103       * Swatch, for coming up with this mad format.
104       * Jerub, from opn, who wrote the python original, from which I retain
105       no code. D'oh.
106
107       Here is a list of people and their CPAN id, extracted from various
108       places.  These people have either submitted patches or suggestions, or
109       their bug reports or comments have inspired the appropriate patches.
110       Corrections, additions, deletions welcome:
111
112       * Dave Rolsky (DROLSKY)
113

SUPPORT

115       You can log bug reports via the CPAN RT system on the web:
116
117           http://rt.cpan.org/
118
119       This makes it much easier for me to track things and thus means your
120       problem is less likely to be neglected.
121
123       Copyright (c) Iain Truskett, 2003. All rights reserved.
124
125       This library is free software; you can redistribute it and/or modify it
126       under the same terms as Perl itself.
127
128       The full text of the licences can be found in the Artistic and COPYING
129       files included with this module.
130

AUTHOR

132       The late Iain Truskett (SPOON) created this module. It is currently
133       maintained by Earle Martin (EMARTIN), who would like to dedicate it to
134       his memory.
135

SEE ALSO

137       * DateTime
138       * The "datetime@perl.org" mailing list
139       * <http://datetime.perl.org/>
140
141
142
143perl v5.8.8                       2004-01-26        DateTime::Format::IBeat(3)
Impressum