Extension:TimeConvert

Category:Unmaintained extensions#TimeConvert Category:Extensions without an imageCategory:Extensions without a compatibility policyCategory:MIT licensed extensions
MediaWiki extensions manual
TimeConvert
Release status: unmaintainedCategory:Unmaintained extensions
Implementation Parser function Category:Parser function extensions
Description Provides a parser function and Scribunto Lua library to convert a time to a different time zone
Author(s) dlhtalk
MediaWiki 1.18+Category:Extensions with manual MediaWiki version
PHP 5.2+
Database changes No
License MIT License
Download Category:Extensions in GitHub version control
README
Category:All extensionsCategory:Extensions not in ExtensionJson

The TimeConvert extension provides a parser function and Scribunto Lua library to convert a time to a different time zone.

Examples

{{#timeconvert:2014-01-01 13:00 GMT|America/New_York}}       => 2014-01-01T08:00:00-0500
{{#timeconvert:2014-01-01 13:00 GMT|America/New_York|g:i A}} => 8:00 AM
{{#timeconvert:2014-01-01 8:00 AM EST|Etc/GMT|G:i}}          => 13:00

Documentation

{{#timeconvert:date time|time zone|format}}

Scribunto Lua Library

TimeConvert provides a Scribunto library, mw.ext.timeconvert. Examples:

local timeconvert = mw.ext.timeconvert.timeconvert
timeconvert("2014-01-01 13:00 GMT", "America/New_York")          => "2014-01-01T08:00:00-0500"
timeconvert("2014-01-01 13:00 GMT", "America/New_York", "g:i A") => "8:00 AM"
timeconvert("2014-01-01 8:00 AM EST", "Etc/GMT", "G:i")          => "13:00"

Installation

Category:All extensions Category:Extensions in GitHub version control Category:Extensions not in ExtensionJson Category:Extensions not using extension registration Category:Extensions with manual MediaWiki version Category:Extensions without a compatibility policy Category:Extensions without an image Category:MIT licensed extensions Category:ParserFirstCallInit extensions Category:Parser function extensions Category:ScribuntoExternalLibraries extensions Category:Unmaintained extensions