NAME NightTime behaves like Time but it also supports out of ranged values SYNOPSIS Native "mktime" method is too strict. Time.mktime(2010, 1, 10, 26, 40) => ArgumentError: argument out of range Time.mktime(2010, 2, 32) => ArgumentError: argument out of range We the midnight workers want flexible one. require 'night-time' NightTime.mktime(2010, 1, 10, 26, 40) => Mon Jan 11 02:40:00 +0900 2010 NightTime.parse('2010-01-10 26:40') => Mon Jan 11 02:40:00 +0900 2010 NightTime.mktime(2010, 2, 32) => Thu Mar 04 00:00:00 +0900 2010 w00t! DESCRIPTION * NightTime.mktime(*args) * NightTime.parse(text) * NightTime::Jst.parse(text, now = nil) # => a Time * NightTime::Jst.parsedate(text) # => an Array JST NightTime::Jst can extract time from Japanese texts. jst = NightTime::Jst.parsedate("テレビ7月8日(土)24:30~25:00") => [nil,7,8,24,30,nil] jst = NightTime::Jst.parse("テレビ7月8日(土)24:30~25:00") => Mon Jul 09 00:30:00 +0900 2012 CHANGES * 1.0.0: independent from Time object HOMEPAGE http://github.com/maiha/night-time AUTHOR maiha@wota.jp
Project
night-time
NightTime behaves like Time but it also supports out of ranged values
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
Development
Dependencies
Development
>= 0
Project Readme