DateTim...t::IBeat(3)
π DateTime::Format::IBeat π
okay bestie, gather round, because we're about to talk about the Perl module DateTime::Format::IBeat β it's a User Contributed Perl Documentation situation and it formats times in .beat notation β¨ no cap.
π NAME π
DateTime::Format::IBeat β format times in .beat notation π periodt.
π¦ DESCRIPTION π¦
No Time Zones No Geographical Borders
okay so how long is a Swatch .beat, you ask? bestie, in short, we have divided up the virtual and real day into 1000 beats. One Swatch beat is the equivalent of 1 minute 26.4 seconds. That means that 12 noon in the old time system is the equivalent of @500 Swatch .beats. literally.
Okay, so how can a surfer in New York, or a passenger on a transatlantic flight know when it is @500 Swatch .beats in Central Europe for example? How can the New York surfer make a date for a chat with his cyber friend in Rome? Easy β Internet Time is the same all over the world. π«Ά
How is this possible? We are not just creating a new way of measuring time, we are also creating a new meridian in Biel, Switzerland, home of Swatch. iconic behavior honestly.
Biel MeanTime (BMT) is the universal reference for Internet Time. A day in Internet Time begins at midnight BMT (@000 Swatch .beats) (Central European Wintertime). The meridian is marked for all to see on the facade of the Swatch International Headquarters on Jakob-Staempfli Street, Biel, Switzerland. So, it is the same time all over the world, be it night or day, the era of time zones has disappeared. π time zones? gone. never met her.
The BMT meridian was inaugurated on 23 October 1998 in the presence of Nicholas Negroponte, founder and director of the Massachusetts Institute of Technology's Media Laboratory.
β¨ PARSING METHODS β¨
π parse_time
Parses a .beat time and returns a DateTime object. The object uses the current date for its date and will have UTC set as its timezone. Feel free to use set to convert to your local time. iykyk.
my $first = DateTime::Format::IBeat->parse_time( '@765' );
print $first->datetime; # 2003-04-01T17:21:36
$first->set_time_zone( "Australia/Sydney" );
print $first->datetime; # 2003-04-02T03:21:36
Note that the leading @ is optional. Also, if using direct strings, and leading @s, be careful to not have it interpolate it as an array by accident. π that's a whole trap, bestie, watch out.
πΈ parse_date
Parses an .beat date and returns a "DateTime" object representing that date.
my $dt = DateTime::Format::IBeat->parse_date('@d01.04.03');
print $dt->ymd('.'); # "2003.04.01"
Note: this assumes the number of .beats elapsed in the day to be 0, thus it will appear to be returning the day before. If you display a full time with it, you will find it's at UTC rather than BMT (+0100), thus 11pm the day before. The important thing to remember is that it is an accurate conversion to the usual notation, despite appearances. π it's giving "lying but not lying", it's fine, trust.
π§ parse_datetime
Parses an ibeat datetime string and returns a "DateTime" object representing that datetime.
my $dt = DateTime::Format::IBeat->parse_datetime(
'@d01.04.03 @765');
print $dt->datetime; # "2003-04-01T17:21:36"
π FORMATTING METHODS π
β format_time
Given a DateTime object, returns a string representating that time in ibeats.
β format_date
Given a DateTime object, returns a string representating that date.
β format_datetime
Given a Datetime object, returns a string representating that date and time in .beats format.
π THANKS π
The original author of this module was Iain Truskett (SPOON). Since his tragically early death, the module has been maintained by Earle Martin (EMARTIN), who would like to dedicate it to his memory. π«Ά
Iain wished to thank:
- Dave Rolsky (DROLSKY) for kickstarting the DateTime project.
- Swatch, for coming up with this mad format. iconic, unhinged, love that for them.
- Jerub, from opn, who wrote the python original, from which I retain no code. D'oh.
Here is a list of people and their CPAN id, extracted from various places. These people have either submitted patches or suggestions, or their bug reports or comments have inspired the appropriate patches. Corrections, additions, deletions welcome:
- Dave Rolsky (DROLSKY)
π«Ά SUPPORT π«Ά
You can log bug reports via the CPAN RT system on the web:
This makes it much easier for me to track things and thus means your problem is less likely to be neglected. π do it, bestie, it's for your own good.
π LICENCE AND COPYRIGHT π
Copyright (c) Iain Truskett, 2003. All rights reserved.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
The full text of the licences can be found in the Artistic and COPYING files included with this module.
π AUTHOR π
The late Iain Truskett (SPOON) created this module. It is currently maintained by Earle Martin (EMARTIN), who would like to dedicate it to his memory.
π SEE ALSO π
- DateTime
- The
"datetime@perl.org"mailing list - http://datetime.perl.org/
okay that's the whole thing, bestie, you're so welcome π β¨
and for the cute sign-off: this page ships with perl v5.42.0, dated 2025-07-25, and it's filed under DateTim...t::IBeat(3). slay, no notes, bye π¦π
π¦ where this page comes from
- fedora 43: perl-DateTime-Format-IBeat 0.161-52.fc43 Β· GPL-1.0-or-later OR Artistic-1.0-Perl
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms