mwtimestamp
mwtimestamp is a library for parsing and formatting MediaWiki
timestamps, powered by chrono.
The MediaWiki API typically produces ISO 8601 timestamps. In some cases, like protection or block expiry, it may alternatively return the string "infinity" to represent that there is no end period.
use ;
// Deserializing a fixed timestamp
let finite: Timestamp = from_str.unwrap;
assert_eq!;
// Deserializing an infinite timestamp
let infinity: Expiry = from_str.unwrap;
assert!;
Contributing
mwtimestamp is a part of the mwbot-rs project.
We're always looking for new contributors, please reach out
if you're interested!
License
This crate is released under GPL-3.0-or-later. See COPYING for details.