time_crisis 0.2.0 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +0 -3
- data/VERSION.yml +2 -2
- data/lib/time_crisis.rb +13 -25
- data/lib/time_crisis/conversions.rb +39 -0
- data/lib/{third_base → time_crisis}/date.rb +135 -133
- data/lib/{third_base → time_crisis}/datetime.rb +123 -111
- data/lib/time_crisis/holiday.rb +8 -6
- data/lib/time_crisis/meteorological_seasons.rb +3 -0
- data/lib/time_crisis/nth_weekday.rb +10 -15
- data/lib/time_crisis/support.rb +13 -8
- data/lib/time_crisis/support/basic_object.rb +18 -0
- data/lib/time_crisis/support/duration.rb +87 -0
- data/lib/time_crisis/support/ext/date/acts_like.rb +9 -0
- data/lib/time_crisis/support/ext/date/calculations.rb +183 -0
- data/lib/time_crisis/support/ext/date/conversions.rb +60 -0
- data/lib/time_crisis/support/ext/date_time/acts_like.rb +13 -0
- data/lib/time_crisis/support/ext/date_time/calculations.rb +88 -0
- data/lib/time_crisis/support/ext/date_time/conversions.rb +66 -0
- data/lib/time_crisis/support/ext/date_time/zones.rb +5 -0
- data/lib/time_crisis/support/ext/object/acts_like.rb +5 -0
- data/lib/time_crisis/support/ext/object/blank.rb +47 -0
- data/lib/time_crisis/support/ext/time/acts_like.rb +9 -0
- data/lib/time_crisis/support/ext/time/calculations.rb +228 -0
- data/lib/time_crisis/support/ext/time/conversions.rb +58 -0
- data/lib/time_crisis/support/ext/time/marshal_with_utc_flag.rb +21 -0
- data/lib/time_crisis/support/ext/time/publicize_conversion_methods.rb +9 -0
- data/lib/time_crisis/support/ext/time/zones.rb +44 -0
- data/lib/time_crisis/support/time_with_zone.rb +272 -0
- data/lib/time_crisis/support/values/time_zone.rb +339 -0
- data/lib/time_crisis/time.rb +4 -0
- data/lib/time_crisis/tzinfo.rb +1 -0
- data/lib/time_crisis/tzinfo/definitions/Africa/Abidjan.rb +18 -0
- data/lib/time_crisis/tzinfo/definitions/Africa/Accra.rb +33 -0
- data/lib/time_crisis/tzinfo/definitions/Africa/Addis_Ababa.rb +20 -0
- data/lib/time_crisis/tzinfo/definitions/Africa/Algiers.rb +2 -2
- data/lib/time_crisis/tzinfo/definitions/Africa/Asmara.rb +22 -0
- data/lib/time_crisis/tzinfo/definitions/Africa/Asmera.rb +13 -0
- data/lib/time_crisis/tzinfo/definitions/Africa/Bamako.rb +21 -0
- data/lib/time_crisis/tzinfo/definitions/Africa/Bangui.rb +18 -0
- data/lib/time_crisis/tzinfo/definitions/Africa/Banjul.rb +22 -0
- data/lib/time_crisis/tzinfo/definitions/Africa/Bissau.rb +20 -0
- data/lib/time_crisis/tzinfo/definitions/Africa/Blantyre.rb +18 -0
- data/lib/time_crisis/tzinfo/definitions/Africa/Brazzaville.rb +18 -0
- data/lib/time_crisis/tzinfo/definitions/Africa/Bujumbura.rb +18 -0
- data/lib/time_crisis/tzinfo/definitions/Africa/Cairo.rb +2 -2
- data/lib/time_crisis/tzinfo/definitions/Africa/Casablanca.rb +2 -2
- data/lib/time_crisis/tzinfo/definitions/Africa/Ceuta.rb +172 -0
- data/lib/time_crisis/tzinfo/definitions/Africa/Conakry.rb +21 -0
- data/lib/time_crisis/tzinfo/definitions/Africa/Dakar.rb +20 -0
- data/lib/time_crisis/tzinfo/definitions/Africa/Dar_es_Salaam.rb +21 -0
- data/lib/time_crisis/tzinfo/definitions/Africa/Djibouti.rb +18 -0
- data/lib/time_crisis/tzinfo/definitions/Africa/Douala.rb +18 -0
- data/lib/time_crisis/tzinfo/definitions/Africa/El_Aaiun.rb +20 -0
- data/lib/time_crisis/tzinfo/definitions/Africa/Freetown.rb +53 -0
- data/lib/time_crisis/tzinfo/definitions/Africa/Gaborone.rb +21 -0
- data/lib/time_crisis/tzinfo/definitions/Africa/Harare.rb +2 -2
- data/lib/time_crisis/tzinfo/definitions/Africa/Johannesburg.rb +2 -2
- data/lib/time_crisis/tzinfo/definitions/Africa/Kampala.rb +23 -0
- data/lib/time_crisis/tzinfo/definitions/Africa/Khartoum.rb +53 -0
- data/lib/time_crisis/tzinfo/definitions/Africa/Kigali.rb +18 -0
- data/lib/time_crisis/tzinfo/definitions/Africa/Kinshasa.rb +18 -0
- data/lib/time_crisis/tzinfo/definitions/Africa/Lagos.rb +18 -0
- data/lib/time_crisis/tzinfo/definitions/Africa/Libreville.rb +18 -0
- data/lib/time_crisis/tzinfo/definitions/Africa/Lome.rb +18 -0
- data/lib/time_crisis/tzinfo/definitions/Africa/Luanda.rb +20 -0
- data/lib/time_crisis/tzinfo/definitions/Africa/Lubumbashi.rb +18 -0
- data/lib/time_crisis/tzinfo/definitions/Africa/Lusaka.rb +18 -0
- data/lib/time_crisis/tzinfo/definitions/Africa/Malabo.rb +20 -0
- data/lib/time_crisis/tzinfo/definitions/Africa/Maputo.rb +18 -0
- data/lib/time_crisis/tzinfo/definitions/Africa/Maseru.rb +21 -0
- data/lib/time_crisis/tzinfo/definitions/Africa/Mbabane.rb +18 -0
- data/lib/time_crisis/tzinfo/definitions/Africa/Mogadishu.rb +21 -0
- data/lib/time_crisis/tzinfo/definitions/Africa/Monrovia.rb +2 -2
- data/lib/time_crisis/tzinfo/definitions/Africa/Nairobi.rb +2 -2
- data/lib/time_crisis/tzinfo/definitions/Africa/Ndjamena.rb +21 -0
- data/lib/time_crisis/tzinfo/definitions/Africa/Niamey.rb +22 -0
- data/lib/time_crisis/tzinfo/definitions/Africa/Nouakchott.rb +21 -0
- data/lib/time_crisis/tzinfo/definitions/Africa/Ouagadougou.rb +18 -0
- data/lib/time_crisis/tzinfo/definitions/Africa/Porto__m__Novo.rb +20 -0
- data/lib/time_crisis/tzinfo/definitions/Africa/Sao_Tome.rb +20 -0
- data/lib/time_crisis/tzinfo/definitions/Africa/Timbuktu.rb +13 -0
- data/lib/time_crisis/tzinfo/definitions/Africa/Tripoli.rb +48 -0
- data/lib/time_crisis/tzinfo/definitions/Africa/Tunis.rb +135 -0
- data/lib/time_crisis/tzinfo/definitions/Africa/Windhoek.rb +140 -0
- data/lib/time_crisis/tzinfo/definitions/America/Adak.rb +196 -0
- data/lib/time_crisis/tzinfo/definitions/America/Anchorage.rb +196 -0
- data/lib/time_crisis/tzinfo/definitions/America/Anguilla.rb +18 -0
- data/lib/time_crisis/tzinfo/definitions/America/Antigua.rb +20 -0
- data/lib/time_crisis/tzinfo/definitions/America/Araguaina.rb +67 -0
- data/lib/time_crisis/tzinfo/definitions/America/Argentina/Buenos_Aires.rb +2 -2
- data/lib/time_crisis/tzinfo/definitions/America/Argentina/Catamarca.rb +85 -0
- data/lib/time_crisis/tzinfo/definitions/America/Argentina/ComodRivadavia.rb +15 -0
- data/lib/time_crisis/tzinfo/definitions/America/Argentina/Cordoba.rb +85 -0
- data/lib/time_crisis/tzinfo/definitions/America/Argentina/Jujuy.rb +84 -0
- data/lib/time_crisis/tzinfo/definitions/America/Argentina/La_Rioja.rb +86 -0
- data/lib/time_crisis/tzinfo/definitions/America/Argentina/Mendoza.rb +86 -0
- data/lib/time_crisis/tzinfo/definitions/America/Argentina/Rio_Gallegos.rb +85 -0
- data/lib/time_crisis/tzinfo/definitions/America/Argentina/Salta.rb +83 -0
- data/lib/time_crisis/tzinfo/definitions/America/Argentina/San_Juan.rb +2 -2
- data/lib/time_crisis/tzinfo/definitions/America/Argentina/San_Luis.rb +168 -0
- data/lib/time_crisis/tzinfo/definitions/America/Argentina/Tucuman.rb +87 -0
- data/lib/time_crisis/tzinfo/definitions/America/Argentina/Ushuaia.rb +85 -0
- data/lib/time_crisis/tzinfo/definitions/America/Aruba.rb +20 -0
- data/lib/time_crisis/tzinfo/definitions/America/Asuncion.rb +174 -0
- data/lib/time_crisis/tzinfo/definitions/America/Atikokan.rb +28 -0
- data/lib/time_crisis/tzinfo/definitions/America/Atka.rb +13 -0
- data/lib/time_crisis/tzinfo/definitions/America/Bahia.rb +77 -0
- data/lib/time_crisis/tzinfo/definitions/America/Barbados.rb +29 -0
- data/lib/time_crisis/tzinfo/definitions/America/Belem.rb +47 -0
- data/lib/time_crisis/tzinfo/definitions/America/Belize.rb +74 -0
- data/lib/time_crisis/tzinfo/definitions/America/Blanc__m__Sablon.rb +26 -0
- data/lib/time_crisis/tzinfo/definitions/America/Boa_Vista.rb +51 -0
- data/lib/time_crisis/tzinfo/definitions/America/Bogota.rb +2 -2
- data/lib/time_crisis/tzinfo/definitions/America/Boise.rb +199 -0
- data/lib/time_crisis/tzinfo/definitions/America/Buenos_Aires.rb +13 -0
- data/lib/time_crisis/tzinfo/definitions/America/Cambridge_Bay.rb +173 -0
- data/lib/time_crisis/tzinfo/definitions/America/Campo_Grande.rb +171 -0
- data/lib/time_crisis/tzinfo/definitions/America/Cancun.rb +133 -0
- data/lib/time_crisis/tzinfo/definitions/America/Caracas.rb +2 -2
- data/lib/time_crisis/tzinfo/definitions/America/Catamarca.rb +13 -0
- data/lib/time_crisis/tzinfo/definitions/America/Cayenne.rb +20 -0
- data/lib/time_crisis/tzinfo/definitions/America/Cayman.rb +20 -0
- data/lib/time_crisis/tzinfo/definitions/America/Chicago.rb +2 -2
- data/lib/time_crisis/tzinfo/definitions/America/Chihuahua.rb +2 -2
- data/lib/time_crisis/tzinfo/definitions/America/Coral_Harbour.rb +13 -0
- data/lib/time_crisis/tzinfo/definitions/America/Cordoba.rb +13 -0
- data/lib/time_crisis/tzinfo/definitions/America/Costa_Rica.rb +29 -0
- data/lib/time_crisis/tzinfo/definitions/America/Cuiaba.rb +169 -0
- data/lib/time_crisis/tzinfo/definitions/America/Curacao.rb +20 -0
- data/lib/time_crisis/tzinfo/definitions/America/Danmarkshavn.rb +53 -0
- data/lib/time_crisis/tzinfo/definitions/America/Dawson.rb +176 -0
- data/lib/time_crisis/tzinfo/definitions/America/Dawson_Creek.rb +79 -0
- data/lib/time_crisis/tzinfo/definitions/America/Denver.rb +2 -2
- data/lib/time_crisis/tzinfo/definitions/America/Detroit.rb +186 -0
- data/lib/time_crisis/tzinfo/definitions/America/Dominica.rb +18 -0
- data/lib/time_crisis/tzinfo/definitions/America/Edmonton.rb +200 -0
- data/lib/time_crisis/tzinfo/definitions/America/Eirunepe.rb +51 -0
- data/lib/time_crisis/tzinfo/definitions/America/El_Salvador.rb +23 -0
- data/lib/time_crisis/tzinfo/definitions/America/Ensenada.rb +13 -0
- data/lib/time_crisis/tzinfo/definitions/America/Fort_Wayne.rb +13 -0
- data/lib/time_crisis/tzinfo/definitions/America/Fortaleza.rb +57 -0
- data/lib/time_crisis/tzinfo/definitions/America/Glace_Bay.rb +186 -0
- data/lib/time_crisis/tzinfo/definitions/America/Godthab.rb +2 -2
- data/lib/time_crisis/tzinfo/definitions/America/Goose_Bay.rb +255 -0
- data/lib/time_crisis/tzinfo/definitions/America/Grand_Turk.rb +165 -0
- data/lib/time_crisis/tzinfo/definitions/America/Grenada.rb +18 -0
- data/lib/time_crisis/tzinfo/definitions/America/Guadeloupe.rb +18 -0
- data/lib/time_crisis/tzinfo/definitions/America/Guatemala.rb +2 -2
- data/lib/time_crisis/tzinfo/definitions/America/Guayaquil.rb +20 -0
- data/lib/time_crisis/tzinfo/definitions/America/Guyana.rb +24 -0
- data/lib/time_crisis/tzinfo/definitions/America/Halifax.rb +2 -2
- data/lib/time_crisis/tzinfo/definitions/America/Havana.rb +201 -0
- data/lib/time_crisis/tzinfo/definitions/America/Hermosillo.rb +35 -0
- data/lib/time_crisis/tzinfo/definitions/America/Indiana/Indianapolis.rb +2 -2
- data/lib/time_crisis/tzinfo/definitions/America/Indiana/Knox.rb +203 -0
- data/lib/time_crisis/tzinfo/definitions/America/Indiana/Marengo.rb +153 -0
- data/lib/time_crisis/tzinfo/definitions/America/Indiana/Petersburg.rb +166 -0
- data/lib/time_crisis/tzinfo/definitions/America/Indiana/Tell_City.rb +151 -0
- data/lib/time_crisis/tzinfo/definitions/America/Indiana/Vevay.rb +131 -0
- data/lib/time_crisis/tzinfo/definitions/America/Indiana/Vincennes.rb +151 -0
- data/lib/time_crisis/tzinfo/definitions/America/Indiana/Winamac.rb +157 -0
- data/lib/time_crisis/tzinfo/definitions/America/Indianapolis.rb +13 -0
- data/lib/time_crisis/tzinfo/definitions/America/Inuvik.rb +166 -0
- data/lib/time_crisis/tzinfo/definitions/America/Iqaluit.rb +170 -0
- data/lib/time_crisis/tzinfo/definitions/America/Jamaica.rb +41 -0
- data/lib/time_crisis/tzinfo/definitions/America/Jujuy.rb +13 -0
- data/lib/time_crisis/tzinfo/definitions/America/Juneau.rb +2 -2
- data/lib/time_crisis/tzinfo/definitions/America/Kentucky/Louisville.rb +228 -0
- data/lib/time_crisis/tzinfo/definitions/America/Kentucky/Monticello.rb +198 -0
- data/lib/time_crisis/tzinfo/definitions/America/Knox_IN.rb +13 -0
- data/lib/time_crisis/tzinfo/definitions/America/La_Paz.rb +2 -2
- data/lib/time_crisis/tzinfo/definitions/America/Lima.rb +2 -2
- data/lib/time_crisis/tzinfo/definitions/America/Los_Angeles.rb +2 -2
- data/lib/time_crisis/tzinfo/definitions/America/Louisville.rb +13 -0
- data/lib/time_crisis/tzinfo/definitions/America/Maceio.rb +59 -0
- data/lib/time_crisis/tzinfo/definitions/America/Managua.rb +36 -0
- data/lib/time_crisis/tzinfo/definitions/America/Manaus.rb +49 -0
- data/lib/time_crisis/tzinfo/definitions/America/Marigot.rb +13 -0
- data/lib/time_crisis/tzinfo/definitions/America/Martinique.rb +23 -0
- data/lib/time_crisis/tzinfo/definitions/America/Mazatlan.rb +2 -2
- data/lib/time_crisis/tzinfo/definitions/America/Mendoza.rb +13 -0
- data/lib/time_crisis/tzinfo/definitions/America/Menominee.rb +190 -0
- data/lib/time_crisis/tzinfo/definitions/America/Merida.rb +132 -0
- data/lib/time_crisis/tzinfo/definitions/America/Mexico_City.rb +2 -2
- data/lib/time_crisis/tzinfo/definitions/America/Miquelon.rb +149 -0
- data/lib/time_crisis/tzinfo/definitions/America/Moncton.rb +254 -0
- data/lib/time_crisis/tzinfo/definitions/America/Monterrey.rb +2 -2
- data/lib/time_crisis/tzinfo/definitions/America/Montevideo.rb +179 -0
- data/lib/time_crisis/tzinfo/definitions/America/Montreal.rb +279 -0
- data/lib/time_crisis/tzinfo/definitions/America/Montserrat.rb +18 -0
- data/lib/time_crisis/tzinfo/definitions/America/Nassau.rb +193 -0
- data/lib/time_crisis/tzinfo/definitions/America/New_York.rb +2 -2
- data/lib/time_crisis/tzinfo/definitions/America/Nipigon.rb +181 -0
- data/lib/time_crisis/tzinfo/definitions/America/Nome.rb +196 -0
- data/lib/time_crisis/tzinfo/definitions/America/Noronha.rb +57 -0
- data/lib/time_crisis/tzinfo/definitions/America/North_Dakota/Center.rb +200 -0
- data/lib/time_crisis/tzinfo/definitions/America/North_Dakota/New_Salem.rb +200 -0
- data/lib/time_crisis/tzinfo/definitions/America/Panama.rb +20 -0
- data/lib/time_crisis/tzinfo/definitions/America/Pangnirtung.rb +173 -0
- data/lib/time_crisis/tzinfo/definitions/America/Paramaribo.rb +26 -0
- data/lib/time_crisis/tzinfo/definitions/America/Phoenix.rb +2 -2
- data/lib/time_crisis/tzinfo/definitions/America/Port__m__au__m__Prince.rb +55 -0
- data/lib/time_crisis/tzinfo/definitions/America/Port_of_Spain.rb +18 -0
- data/lib/time_crisis/tzinfo/definitions/America/Porto_Acre.rb +13 -0
- data/lib/time_crisis/tzinfo/definitions/America/Porto_Velho.rb +47 -0
- data/lib/time_crisis/tzinfo/definitions/America/Puerto_Rico.rb +23 -0
- data/lib/time_crisis/tzinfo/definitions/America/Rainy_River.rb +181 -0
- data/lib/time_crisis/tzinfo/definitions/America/Rankin_Inlet.rb +165 -0
- data/lib/time_crisis/tzinfo/definitions/America/Recife.rb +57 -0
- data/lib/time_crisis/tzinfo/definitions/America/Regina.rb +2 -2
- data/lib/time_crisis/tzinfo/definitions/America/Resolute.rb +166 -0
- data/lib/time_crisis/tzinfo/definitions/America/Rio_Branco.rb +49 -0
- data/lib/time_crisis/tzinfo/definitions/America/Rosario.rb +13 -0
- data/lib/time_crisis/tzinfo/definitions/America/Santarem.rb +49 -0
- data/lib/time_crisis/tzinfo/definitions/America/Santiago.rb +2 -2
- data/lib/time_crisis/tzinfo/definitions/America/Santo_Domingo.rb +38 -0
- data/lib/time_crisis/tzinfo/definitions/America/Sao_Paulo.rb +2 -2
- data/lib/time_crisis/tzinfo/definitions/America/Scoresbysund.rb +163 -0
- data/lib/time_crisis/tzinfo/definitions/America/Shiprock.rb +13 -0
- data/lib/time_crisis/tzinfo/definitions/America/St_Barthelemy.rb +13 -0
- data/lib/time_crisis/tzinfo/definitions/America/St_Johns.rb +2 -2
- data/lib/time_crisis/tzinfo/definitions/America/St_Kitts.rb +18 -0
- data/lib/time_crisis/tzinfo/definitions/America/St_Lucia.rb +20 -0
- data/lib/time_crisis/tzinfo/definitions/America/St_Thomas.rb +18 -0
- data/lib/time_crisis/tzinfo/definitions/America/St_Vincent.rb +20 -0
- data/lib/time_crisis/tzinfo/definitions/America/Swift_Current.rb +44 -0
- data/lib/time_crisis/tzinfo/definitions/America/Tegucigalpa.rb +25 -0
- data/lib/time_crisis/tzinfo/definitions/America/Thule.rb +139 -0
- data/lib/time_crisis/tzinfo/definitions/America/Thunder_Bay.rb +186 -0
- data/lib/time_crisis/tzinfo/definitions/America/Tijuana.rb +2 -2
- data/lib/time_crisis/tzinfo/definitions/America/Toronto.rb +279 -0
- data/lib/time_crisis/tzinfo/definitions/America/Tortola.rb +18 -0
- data/lib/time_crisis/tzinfo/definitions/America/Vancouver.rb +236 -0
- data/lib/time_crisis/tzinfo/definitions/America/Virgin.rb +13 -0
- data/lib/time_crisis/tzinfo/definitions/America/Whitehorse.rb +176 -0
- data/lib/time_crisis/tzinfo/definitions/America/Winnipeg.rb +232 -0
- data/lib/time_crisis/tzinfo/definitions/America/Yakutat.rb +193 -0
- data/lib/time_crisis/tzinfo/definitions/America/Yellowknife.rb +169 -0
- data/lib/time_crisis/tzinfo/definitions/Antarctica/Casey.rb +18 -0
- data/lib/time_crisis/tzinfo/definitions/Antarctica/Davis.rb +20 -0
- data/lib/time_crisis/tzinfo/definitions/Antarctica/DumontDUrville.rb +21 -0
- data/lib/time_crisis/tzinfo/definitions/Antarctica/Mawson.rb +18 -0
- data/lib/time_crisis/tzinfo/definitions/Antarctica/McMurdo.rb +171 -0
- data/lib/time_crisis/tzinfo/definitions/Antarctica/Palmer.rb +172 -0
- data/lib/time_crisis/tzinfo/definitions/Antarctica/Rothera.rb +18 -0
- data/lib/time_crisis/tzinfo/definitions/Antarctica/South_Pole.rb +13 -0
- data/lib/time_crisis/tzinfo/definitions/Antarctica/Syowa.rb +18 -0
- data/lib/time_crisis/tzinfo/definitions/Antarctica/Vostok.rb +18 -0
- data/lib/time_crisis/tzinfo/definitions/Arctic/Longyearbyen.rb +13 -0
- data/lib/time_crisis/tzinfo/definitions/Asia/Aden.rb +18 -0
- data/lib/time_crisis/tzinfo/definitions/Asia/Almaty.rb +2 -2
- data/lib/time_crisis/tzinfo/definitions/Asia/Amman.rb +163 -0
- data/lib/time_crisis/tzinfo/definitions/Asia/Anadyr.rb +165 -0
- data/lib/time_crisis/tzinfo/definitions/Asia/Aqtau.rb +75 -0
- data/lib/time_crisis/tzinfo/definitions/Asia/Aqtobe.rb +71 -0
- data/lib/time_crisis/tzinfo/definitions/Asia/Ashgabat.rb +48 -0
- data/lib/time_crisis/tzinfo/definitions/Asia/Ashkhabad.rb +13 -0
- data/lib/time_crisis/tzinfo/definitions/Asia/Baghdad.rb +2 -2
- data/lib/time_crisis/tzinfo/definitions/Asia/Bahrain.rb +20 -0
- data/lib/time_crisis/tzinfo/definitions/Asia/Baku.rb +2 -2
- data/lib/time_crisis/tzinfo/definitions/Asia/Bangkok.rb +2 -2
- data/lib/time_crisis/tzinfo/definitions/Asia/Beirut.rb +185 -0
- data/lib/time_crisis/tzinfo/definitions/Asia/Bishkek.rb +75 -0
- data/lib/time_crisis/tzinfo/definitions/Asia/Brunei.rb +20 -0
- data/lib/time_crisis/tzinfo/definitions/Asia/Calcutta.rb +13 -0
- data/lib/time_crisis/tzinfo/definitions/Asia/Choibalsan.rb +68 -0
- data/lib/time_crisis/tzinfo/definitions/Asia/Chongqing.rb +2 -2
- data/lib/time_crisis/tzinfo/definitions/Asia/Chungking.rb +13 -0
- data/lib/time_crisis/tzinfo/definitions/Asia/Colombo.rb +2 -2
- data/lib/time_crisis/tzinfo/definitions/Asia/Dacca.rb +13 -0
- data/lib/time_crisis/tzinfo/definitions/Asia/Damascus.rb +195 -0
- data/lib/time_crisis/tzinfo/definitions/Asia/Dhaka.rb +2 -2
- data/lib/time_crisis/tzinfo/definitions/Asia/Dili.rb +25 -0
- data/lib/time_crisis/tzinfo/definitions/Asia/Dubai.rb +18 -0
- data/lib/time_crisis/tzinfo/definitions/Asia/Dushanbe.rb +45 -0
- data/lib/time_crisis/tzinfo/definitions/Asia/Gaza.rb +191 -0
- data/lib/time_crisis/tzinfo/definitions/Asia/Harbin.rb +37 -0
- data/lib/time_crisis/tzinfo/definitions/Asia/Ho_Chi_Minh.rb +23 -0
- data/lib/time_crisis/tzinfo/definitions/Asia/Hong_Kong.rb +2 -2
- data/lib/time_crisis/tzinfo/definitions/Asia/Hovd.rb +65 -0
- data/lib/time_crisis/tzinfo/definitions/Asia/Irkutsk.rb +2 -2
- data/lib/time_crisis/tzinfo/definitions/Asia/Istanbul.rb +13 -0
- data/lib/time_crisis/tzinfo/definitions/Asia/Jakarta.rb +2 -2
- data/lib/time_crisis/tzinfo/definitions/Asia/Jayapura.rb +21 -0
- data/lib/time_crisis/tzinfo/definitions/Asia/Jerusalem.rb +2 -2
- data/lib/time_crisis/tzinfo/definitions/Asia/Kabul.rb +2 -2
- data/lib/time_crisis/tzinfo/definitions/Asia/Kamchatka.rb +2 -2
- data/lib/time_crisis/tzinfo/definitions/Asia/Karachi.rb +2 -2
- data/lib/time_crisis/tzinfo/definitions/Asia/Kashgar.rb +35 -0
- data/lib/time_crisis/tzinfo/definitions/Asia/Kathmandu.rb +2 -2
- data/lib/time_crisis/tzinfo/definitions/Asia/Katmandu.rb +13 -0
- data/lib/time_crisis/tzinfo/definitions/Asia/Kolkata.rb +2 -2
- data/lib/time_crisis/tzinfo/definitions/Asia/Krasnoyarsk.rb +2 -2
- data/lib/time_crisis/tzinfo/definitions/Asia/Kuala_Lumpur.rb +2 -2
- data/lib/time_crisis/tzinfo/definitions/Asia/Kuching.rb +40 -0
- data/lib/time_crisis/tzinfo/definitions/Asia/Kuwait.rb +2 -2
- data/lib/time_crisis/tzinfo/definitions/Asia/Macao.rb +13 -0
- data/lib/time_crisis/tzinfo/definitions/Asia/Macau.rb +61 -0
- data/lib/time_crisis/tzinfo/definitions/Asia/Magadan.rb +2 -2
- data/lib/time_crisis/tzinfo/definitions/Asia/Makassar.rb +23 -0
- data/lib/time_crisis/tzinfo/definitions/Asia/Manila.rb +30 -0
- data/lib/time_crisis/tzinfo/definitions/Asia/Muscat.rb +2 -2
- data/lib/time_crisis/tzinfo/definitions/Asia/Nicosia.rb +171 -0
- data/lib/time_crisis/tzinfo/definitions/Asia/Novosibirsk.rb +2 -2
- data/lib/time_crisis/tzinfo/definitions/Asia/Omsk.rb +163 -0
- data/lib/time_crisis/tzinfo/definitions/Asia/Oral.rb +74 -0
- data/lib/time_crisis/tzinfo/definitions/Asia/Phnom_Penh.rb +23 -0
- data/lib/time_crisis/tzinfo/definitions/Asia/Pontianak.rb +30 -0
- data/lib/time_crisis/tzinfo/definitions/Asia/Pyongyang.rb +25 -0
- data/lib/time_crisis/tzinfo/definitions/Asia/Qatar.rb +20 -0
- data/lib/time_crisis/tzinfo/definitions/Asia/Qyzylorda.rb +73 -0
- data/lib/time_crisis/tzinfo/definitions/Asia/Rangoon.rb +2 -2
- data/lib/time_crisis/tzinfo/definitions/Asia/Riyadh.rb +2 -2
- data/lib/time_crisis/tzinfo/definitions/Asia/Riyadh87.rb +592 -0
- data/lib/time_crisis/tzinfo/definitions/Asia/Riyadh88.rb +582 -0
- data/lib/time_crisis/tzinfo/definitions/Asia/Riyadh89.rb +582 -0
- data/lib/time_crisis/tzinfo/definitions/Asia/Saigon.rb +13 -0
- data/lib/time_crisis/tzinfo/definitions/Asia/Sakhalin.rb +166 -0
- data/lib/time_crisis/tzinfo/definitions/Asia/Samarkand.rb +47 -0
- data/lib/time_crisis/tzinfo/definitions/Asia/Seoul.rb +2 -2
- data/lib/time_crisis/tzinfo/definitions/Asia/Shanghai.rb +2 -2
- data/lib/time_crisis/tzinfo/definitions/Asia/Singapore.rb +2 -2
- data/lib/time_crisis/tzinfo/definitions/Asia/Taipei.rb +2 -2
- data/lib/time_crisis/tzinfo/definitions/Asia/Tashkent.rb +2 -2
- data/lib/time_crisis/tzinfo/definitions/Asia/Tbilisi.rb +2 -2
- data/lib/time_crisis/tzinfo/definitions/Asia/Tehran.rb +2 -2
- data/lib/time_crisis/tzinfo/definitions/Asia/Tel_Aviv.rb +13 -0
- data/lib/time_crisis/tzinfo/definitions/Asia/Thimbu.rb +13 -0
- data/lib/time_crisis/tzinfo/definitions/Asia/Thimphu.rb +20 -0
- data/lib/time_crisis/tzinfo/definitions/Asia/Tokyo.rb +2 -2
- data/lib/time_crisis/tzinfo/definitions/Asia/Ujung_Pandang.rb +13 -0
- data/lib/time_crisis/tzinfo/definitions/Asia/Ulaanbaatar.rb +2 -2
- data/lib/time_crisis/tzinfo/definitions/Asia/Ulan_Bator.rb +13 -0
- data/lib/time_crisis/tzinfo/definitions/Asia/Urumqi.rb +2 -2
- data/lib/time_crisis/tzinfo/definitions/Asia/Vientiane.rb +23 -0
- data/lib/time_crisis/tzinfo/definitions/Asia/Vladivostok.rb +2 -2
- data/lib/time_crisis/tzinfo/definitions/Asia/Yakutsk.rb +2 -2
- data/lib/time_crisis/tzinfo/definitions/Asia/Yekaterinburg.rb +2 -2
- data/lib/time_crisis/tzinfo/definitions/Asia/Yerevan.rb +2 -2
- data/lib/time_crisis/tzinfo/definitions/Atlantic/Azores.rb +2 -2
- data/lib/time_crisis/tzinfo/definitions/Atlantic/Bermuda.rb +173 -0
- data/lib/time_crisis/tzinfo/definitions/Atlantic/Canary.rb +163 -0
- data/lib/time_crisis/tzinfo/definitions/Atlantic/Cape_Verde.rb +2 -2
- data/lib/time_crisis/tzinfo/definitions/Atlantic/Faeroe.rb +13 -0
- data/lib/time_crisis/tzinfo/definitions/Atlantic/Faroe.rb +159 -0
- data/lib/time_crisis/tzinfo/definitions/Atlantic/Jan_Mayen.rb +13 -0
- data/lib/time_crisis/tzinfo/definitions/Atlantic/Madeira.rb +269 -0
- data/lib/time_crisis/tzinfo/definitions/Atlantic/Reykjavik.rb +85 -0
- data/lib/time_crisis/tzinfo/definitions/Atlantic/South_Georgia.rb +2 -2
- data/lib/time_crisis/tzinfo/definitions/Atlantic/St_Helena.rb +20 -0
- data/lib/time_crisis/tzinfo/definitions/Atlantic/Stanley.rb +170 -0
- data/lib/time_crisis/tzinfo/definitions/Australia/ACT.rb +13 -0
- data/lib/time_crisis/tzinfo/definitions/Australia/Adelaide.rb +2 -2
- data/lib/time_crisis/tzinfo/definitions/Australia/Brisbane.rb +2 -2
- data/lib/time_crisis/tzinfo/definitions/Australia/Broken_Hill.rb +189 -0
- data/lib/time_crisis/tzinfo/definitions/Australia/Canberra.rb +13 -0
- data/lib/time_crisis/tzinfo/definitions/Australia/Currie.rb +185 -0
- data/lib/time_crisis/tzinfo/definitions/Australia/Darwin.rb +2 -2
- data/lib/time_crisis/tzinfo/definitions/Australia/Eucla.rb +37 -0
- data/lib/time_crisis/tzinfo/definitions/Australia/Hobart.rb +2 -2
- data/lib/time_crisis/tzinfo/definitions/Australia/LHI.rb +13 -0
- data/lib/time_crisis/tzinfo/definitions/Australia/Lindeman.rb +39 -0
- data/lib/time_crisis/tzinfo/definitions/Australia/Lord_Howe.rb +160 -0
- data/lib/time_crisis/tzinfo/definitions/Australia/Melbourne.rb +2 -2
- data/lib/time_crisis/tzinfo/definitions/Australia/NSW.rb +13 -0
- data/lib/time_crisis/tzinfo/definitions/Australia/North.rb +13 -0
- data/lib/time_crisis/tzinfo/definitions/Australia/Perth.rb +2 -2
- data/lib/time_crisis/tzinfo/definitions/Australia/Queensland.rb +13 -0
- data/lib/time_crisis/tzinfo/definitions/Australia/South.rb +13 -0
- data/lib/time_crisis/tzinfo/definitions/Australia/Sydney.rb +2 -2
- data/lib/time_crisis/tzinfo/definitions/Australia/Tasmania.rb +13 -0
- data/lib/time_crisis/tzinfo/definitions/Australia/Victoria.rb +13 -0
- data/lib/time_crisis/tzinfo/definitions/Australia/West.rb +13 -0
- data/lib/time_crisis/tzinfo/definitions/Australia/Yancowinna.rb +13 -0
- data/lib/time_crisis/tzinfo/definitions/Brazil/Acre.rb +13 -0
- data/lib/time_crisis/tzinfo/definitions/Brazil/DeNoronha.rb +13 -0
- data/lib/time_crisis/tzinfo/definitions/Brazil/East.rb +13 -0
- data/lib/time_crisis/tzinfo/definitions/Brazil/West.rb +13 -0
- data/lib/time_crisis/tzinfo/definitions/CET.rb +177 -0
- data/lib/time_crisis/tzinfo/definitions/CST6CDT.rb +192 -0
- data/lib/time_crisis/tzinfo/definitions/Canada/Atlantic.rb +13 -0
- data/lib/time_crisis/tzinfo/definitions/Canada/Central.rb +13 -0
- data/lib/time_crisis/tzinfo/definitions/Canada/East__m__Saskatchewan.rb +13 -0
- data/lib/time_crisis/tzinfo/definitions/Canada/Eastern.rb +13 -0
- data/lib/time_crisis/tzinfo/definitions/Canada/Mountain.rb +13 -0
- data/lib/time_crisis/tzinfo/definitions/Canada/Newfoundland.rb +13 -0
- data/lib/time_crisis/tzinfo/definitions/Canada/Pacific.rb +13 -0
- data/lib/time_crisis/tzinfo/definitions/Canada/Saskatchewan.rb +13 -0
- data/lib/time_crisis/tzinfo/definitions/Canada/Yukon.rb +13 -0
- data/lib/time_crisis/tzinfo/definitions/Chile/Continental.rb +13 -0
- data/lib/time_crisis/tzinfo/definitions/Chile/EasterIsland.rb +13 -0
- data/lib/time_crisis/tzinfo/definitions/Cuba.rb +11 -0
- data/lib/time_crisis/tzinfo/definitions/EET.rb +163 -0
- data/lib/time_crisis/tzinfo/definitions/EST.rb +14 -0
- data/lib/time_crisis/tzinfo/definitions/EST5EDT.rb +192 -0
- data/lib/time_crisis/tzinfo/definitions/Egypt.rb +11 -0
- data/lib/time_crisis/tzinfo/definitions/Eire.rb +11 -0
- data/lib/time_crisis/tzinfo/definitions/Etc/GMT.rb +16 -0
- data/lib/time_crisis/tzinfo/definitions/Etc/GMT0.rb +13 -0
- data/lib/time_crisis/tzinfo/definitions/Etc/GMT__m__0.rb +13 -0
- data/lib/time_crisis/tzinfo/definitions/Etc/GMT__m__1.rb +16 -0
- data/lib/time_crisis/tzinfo/definitions/Etc/GMT__m__10.rb +16 -0
- data/lib/time_crisis/tzinfo/definitions/Etc/GMT__m__11.rb +16 -0
- data/lib/time_crisis/tzinfo/definitions/Etc/GMT__m__12.rb +16 -0
- data/lib/time_crisis/tzinfo/definitions/Etc/GMT__m__13.rb +16 -0
- data/lib/time_crisis/tzinfo/definitions/Etc/GMT__m__14.rb +16 -0
- data/lib/time_crisis/tzinfo/definitions/Etc/GMT__m__2.rb +16 -0
- data/lib/time_crisis/tzinfo/definitions/Etc/GMT__m__3.rb +16 -0
- data/lib/time_crisis/tzinfo/definitions/Etc/GMT__m__4.rb +16 -0
- data/lib/time_crisis/tzinfo/definitions/Etc/GMT__m__5.rb +16 -0
- data/lib/time_crisis/tzinfo/definitions/Etc/GMT__m__6.rb +16 -0
- data/lib/time_crisis/tzinfo/definitions/Etc/GMT__m__7.rb +16 -0
- data/lib/time_crisis/tzinfo/definitions/Etc/GMT__m__8.rb +16 -0
- data/lib/time_crisis/tzinfo/definitions/Etc/GMT__m__9.rb +16 -0
- data/lib/time_crisis/tzinfo/definitions/Etc/GMT__p__0.rb +13 -0
- data/lib/time_crisis/tzinfo/definitions/Etc/GMT__p__1.rb +16 -0
- data/lib/time_crisis/tzinfo/definitions/Etc/GMT__p__10.rb +16 -0
- data/lib/time_crisis/tzinfo/definitions/Etc/GMT__p__11.rb +16 -0
- data/lib/time_crisis/tzinfo/definitions/Etc/GMT__p__12.rb +16 -0
- data/lib/time_crisis/tzinfo/definitions/Etc/GMT__p__2.rb +16 -0
- data/lib/time_crisis/tzinfo/definitions/Etc/GMT__p__3.rb +16 -0
- data/lib/time_crisis/tzinfo/definitions/Etc/GMT__p__4.rb +16 -0
- data/lib/time_crisis/tzinfo/definitions/Etc/GMT__p__5.rb +16 -0
- data/lib/time_crisis/tzinfo/definitions/Etc/GMT__p__6.rb +16 -0
- data/lib/time_crisis/tzinfo/definitions/Etc/GMT__p__7.rb +16 -0
- data/lib/time_crisis/tzinfo/definitions/Etc/GMT__p__8.rb +16 -0
- data/lib/time_crisis/tzinfo/definitions/Etc/GMT__p__9.rb +16 -0
- data/lib/time_crisis/tzinfo/definitions/Etc/Greenwich.rb +13 -0
- data/lib/time_crisis/tzinfo/definitions/Etc/UCT.rb +16 -0
- data/lib/time_crisis/tzinfo/definitions/Etc/UTC.rb +2 -2
- data/lib/time_crisis/tzinfo/definitions/Etc/Universal.rb +13 -0
- data/lib/time_crisis/tzinfo/definitions/Etc/Zulu.rb +13 -0
- data/lib/time_crisis/tzinfo/definitions/Europe/Amsterdam.rb +2 -2
- data/lib/time_crisis/tzinfo/definitions/Europe/Andorra.rb +153 -0
- data/lib/time_crisis/tzinfo/definitions/Europe/Athens.rb +2 -2
- data/lib/time_crisis/tzinfo/definitions/Europe/Belfast.rb +13 -0
- data/lib/time_crisis/tzinfo/definitions/Europe/Belgrade.rb +2 -2
- data/lib/time_crisis/tzinfo/definitions/Europe/Berlin.rb +2 -2
- data/lib/time_crisis/tzinfo/definitions/Europe/Bratislava.rb +1 -1
- data/lib/time_crisis/tzinfo/definitions/Europe/Brussels.rb +2 -2
- data/lib/time_crisis/tzinfo/definitions/Europe/Bucharest.rb +2 -2
- data/lib/time_crisis/tzinfo/definitions/Europe/Budapest.rb +2 -2
- data/lib/time_crisis/tzinfo/definitions/Europe/Chisinau.rb +189 -0
- data/lib/time_crisis/tzinfo/definitions/Europe/Copenhagen.rb +2 -2
- data/lib/time_crisis/tzinfo/definitions/Europe/Dublin.rb +2 -2
- data/lib/time_crisis/tzinfo/definitions/Europe/Gibraltar.rb +245 -0
- data/lib/time_crisis/tzinfo/definitions/Europe/Guernsey.rb +13 -0
- data/lib/time_crisis/tzinfo/definitions/Europe/Helsinki.rb +2 -2
- data/lib/time_crisis/tzinfo/definitions/Europe/Isle_of_Man.rb +13 -0
- data/lib/time_crisis/tzinfo/definitions/Europe/Istanbul.rb +2 -2
- data/lib/time_crisis/tzinfo/definitions/Europe/Jersey.rb +13 -0
- data/lib/time_crisis/tzinfo/definitions/Europe/Kaliningrad.rb +181 -0
- data/lib/time_crisis/tzinfo/definitions/Europe/Kiev.rb +2 -2
- data/lib/time_crisis/tzinfo/definitions/Europe/Lisbon.rb +2 -2
- data/lib/time_crisis/tzinfo/definitions/Europe/Ljubljana.rb +1 -1
- data/lib/time_crisis/tzinfo/definitions/Europe/London.rb +2 -2
- data/lib/time_crisis/tzinfo/definitions/Europe/Luxembourg.rb +231 -0
- data/lib/time_crisis/tzinfo/definitions/Europe/Madrid.rb +2 -2
- data/lib/time_crisis/tzinfo/definitions/Europe/Malta.rb +213 -0
- data/lib/time_crisis/tzinfo/definitions/Europe/Mariehamn.rb +13 -0
- data/lib/time_crisis/tzinfo/definitions/Europe/Minsk.rb +2 -2
- data/lib/time_crisis/tzinfo/definitions/Europe/Monaco.rb +233 -0
- data/lib/time_crisis/tzinfo/definitions/Europe/Moscow.rb +2 -2
- data/lib/time_crisis/tzinfo/definitions/Europe/Nicosia.rb +13 -0
- data/lib/time_crisis/tzinfo/definitions/Europe/Oslo.rb +185 -0
- data/lib/time_crisis/tzinfo/definitions/Europe/Paris.rb +2 -2
- data/lib/time_crisis/tzinfo/definitions/Europe/Podgorica.rb +13 -0
- data/lib/time_crisis/tzinfo/definitions/Europe/Prague.rb +2 -2
- data/lib/time_crisis/tzinfo/definitions/Europe/Riga.rb +2 -2
- data/lib/time_crisis/tzinfo/definitions/Europe/Rome.rb +2 -2
- data/lib/time_crisis/tzinfo/definitions/Europe/Samara.rb +168 -0
- data/lib/time_crisis/tzinfo/definitions/Europe/San_Marino.rb +13 -0
- data/lib/time_crisis/tzinfo/definitions/Europe/Sarajevo.rb +1 -1
- data/lib/time_crisis/tzinfo/definitions/Europe/Simferopol.rb +170 -0
- data/lib/time_crisis/tzinfo/definitions/Europe/Skopje.rb +1 -1
- data/lib/time_crisis/tzinfo/definitions/Europe/Sofia.rb +2 -2
- data/lib/time_crisis/tzinfo/definitions/Europe/Stockholm.rb +2 -2
- data/lib/time_crisis/tzinfo/definitions/Europe/Tallinn.rb +2 -2
- data/lib/time_crisis/tzinfo/definitions/Europe/Tirane.rb +177 -0
- data/lib/time_crisis/tzinfo/definitions/Europe/Tiraspol.rb +13 -0
- data/lib/time_crisis/tzinfo/definitions/Europe/Uzhgorod.rb +168 -0
- data/lib/time_crisis/tzinfo/definitions/Europe/Vaduz.rb +159 -0
- data/lib/time_crisis/tzinfo/definitions/Europe/Vatican.rb +13 -0
- data/lib/time_crisis/tzinfo/definitions/Europe/Vienna.rb +2 -2
- data/lib/time_crisis/tzinfo/definitions/Europe/Vilnius.rb +2 -2
- data/lib/time_crisis/tzinfo/definitions/Europe/Volgograd.rb +166 -0
- data/lib/time_crisis/tzinfo/definitions/Europe/Warsaw.rb +2 -2
- data/lib/time_crisis/tzinfo/definitions/Europe/Zagreb.rb +1 -1
- data/lib/time_crisis/tzinfo/definitions/Europe/Zaporozhye.rb +171 -0
- data/lib/time_crisis/tzinfo/definitions/Europe/Zurich.rb +165 -0
- data/lib/time_crisis/tzinfo/definitions/GB.rb +11 -0
- data/lib/time_crisis/tzinfo/definitions/GB__m__Eire.rb +11 -0
- data/lib/time_crisis/tzinfo/definitions/GMT.rb +11 -0
- data/lib/time_crisis/tzinfo/definitions/GMT0.rb +11 -0
- data/lib/time_crisis/tzinfo/definitions/GMT__m__0.rb +11 -0
- data/lib/time_crisis/tzinfo/definitions/GMT__p__0.rb +11 -0
- data/lib/time_crisis/tzinfo/definitions/Greenwich.rb +11 -0
- data/lib/time_crisis/tzinfo/definitions/HST.rb +14 -0
- data/lib/time_crisis/tzinfo/definitions/Hongkong.rb +11 -0
- data/lib/time_crisis/tzinfo/definitions/Iceland.rb +11 -0
- data/lib/time_crisis/tzinfo/definitions/Indian/Antananarivo.rb +21 -0
- data/lib/time_crisis/tzinfo/definitions/Indian/Chagos.rb +20 -0
- data/lib/time_crisis/tzinfo/definitions/Indian/Christmas.rb +18 -0
- data/lib/time_crisis/tzinfo/definitions/Indian/Cocos.rb +18 -0
- data/lib/time_crisis/tzinfo/definitions/Indian/Comoro.rb +18 -0
- data/lib/time_crisis/tzinfo/definitions/Indian/Kerguelen.rb +18 -0
- data/lib/time_crisis/tzinfo/definitions/Indian/Mahe.rb +18 -0
- data/lib/time_crisis/tzinfo/definitions/Indian/Maldives.rb +20 -0
- data/lib/time_crisis/tzinfo/definitions/Indian/Mauritius.rb +23 -0
- data/lib/time_crisis/tzinfo/definitions/Indian/Mayotte.rb +18 -0
- data/lib/time_crisis/tzinfo/definitions/Indian/Reunion.rb +18 -0
- data/lib/time_crisis/tzinfo/definitions/Iran.rb +11 -0
- data/lib/time_crisis/tzinfo/definitions/Israel.rb +11 -0
- data/lib/time_crisis/tzinfo/definitions/Jamaica.rb +11 -0
- data/lib/time_crisis/tzinfo/definitions/Japan.rb +11 -0
- data/lib/time_crisis/tzinfo/definitions/Kwajalein.rb +11 -0
- data/lib/time_crisis/tzinfo/definitions/Libya.rb +11 -0
- data/lib/time_crisis/tzinfo/definitions/MET.rb +177 -0
- data/lib/time_crisis/tzinfo/definitions/MST.rb +14 -0
- data/lib/time_crisis/tzinfo/definitions/MST7MDT.rb +192 -0
- data/lib/time_crisis/tzinfo/definitions/Mexico/BajaNorte.rb +13 -0
- data/lib/time_crisis/tzinfo/definitions/Mexico/BajaSur.rb +13 -0
- data/lib/time_crisis/tzinfo/definitions/Mexico/General.rb +13 -0
- data/lib/time_crisis/tzinfo/definitions/Mideast/Riyadh87.rb +13 -0
- data/lib/time_crisis/tzinfo/definitions/Mideast/Riyadh88.rb +13 -0
- data/lib/time_crisis/tzinfo/definitions/Mideast/Riyadh89.rb +13 -0
- data/lib/time_crisis/tzinfo/definitions/NZ.rb +11 -0
- data/lib/time_crisis/tzinfo/definitions/NZ__m__CHAT.rb +11 -0
- data/lib/time_crisis/tzinfo/definitions/Navajo.rb +11 -0
- data/lib/time_crisis/tzinfo/definitions/PRC.rb +11 -0
- data/lib/time_crisis/tzinfo/definitions/PST8PDT.rb +192 -0
- data/lib/time_crisis/tzinfo/definitions/Pacific/Apia.rb +25 -0
- data/lib/time_crisis/tzinfo/definitions/Pacific/Auckland.rb +2 -2
- data/lib/time_crisis/tzinfo/definitions/Pacific/Chatham.rb +171 -0
- data/lib/time_crisis/tzinfo/definitions/Pacific/Easter.rb +190 -0
- data/lib/time_crisis/tzinfo/definitions/Pacific/Efate.rb +39 -0
- data/lib/time_crisis/tzinfo/definitions/Pacific/Enderbury.rb +22 -0
- data/lib/time_crisis/tzinfo/definitions/Pacific/Fakaofo.rb +18 -0
- data/lib/time_crisis/tzinfo/definitions/Pacific/Fiji.rb +2 -2
- data/lib/time_crisis/tzinfo/definitions/Pacific/Funafuti.rb +18 -0
- data/lib/time_crisis/tzinfo/definitions/Pacific/Galapagos.rb +20 -0
- data/lib/time_crisis/tzinfo/definitions/Pacific/Gambier.rb +18 -0
- data/lib/time_crisis/tzinfo/definitions/Pacific/Guadalcanal.rb +18 -0
- data/lib/time_crisis/tzinfo/definitions/Pacific/Guam.rb +2 -2
- data/lib/time_crisis/tzinfo/definitions/Pacific/Honolulu.rb +2 -2
- data/lib/time_crisis/tzinfo/definitions/Pacific/Johnston.rb +16 -0
- data/lib/time_crisis/tzinfo/definitions/Pacific/Kiritimati.rb +22 -0
- data/lib/time_crisis/tzinfo/definitions/Pacific/Kosrae.rb +21 -0
- data/lib/time_crisis/tzinfo/definitions/Pacific/Kwajalein.rb +22 -0
- data/lib/time_crisis/tzinfo/definitions/Pacific/Majuro.rb +2 -2
- data/lib/time_crisis/tzinfo/definitions/Pacific/Marquesas.rb +18 -0
- data/lib/time_crisis/tzinfo/definitions/Pacific/Midway.rb +2 -2
- data/lib/time_crisis/tzinfo/definitions/Pacific/Nauru.rb +23 -0
- data/lib/time_crisis/tzinfo/definitions/Pacific/Niue.rb +22 -0
- data/lib/time_crisis/tzinfo/definitions/Pacific/Norfolk.rb +20 -0
- data/lib/time_crisis/tzinfo/definitions/Pacific/Noumea.rb +2 -2
- data/lib/time_crisis/tzinfo/definitions/Pacific/Pago_Pago.rb +2 -2
- data/lib/time_crisis/tzinfo/definitions/Pacific/Palau.rb +18 -0
- data/lib/time_crisis/tzinfo/definitions/Pacific/Pitcairn.rb +20 -0
- data/lib/time_crisis/tzinfo/definitions/Pacific/Ponape.rb +18 -0
- data/lib/time_crisis/tzinfo/definitions/Pacific/Port_Moresby.rb +2 -2
- data/lib/time_crisis/tzinfo/definitions/Pacific/Rarotonga.rb +46 -0
- data/lib/time_crisis/tzinfo/definitions/Pacific/Saipan.rb +24 -0
- data/lib/time_crisis/tzinfo/definitions/Pacific/Samoa.rb +13 -0
- data/lib/time_crisis/tzinfo/definitions/Pacific/Tahiti.rb +18 -0
- data/lib/time_crisis/tzinfo/definitions/Pacific/Tarawa.rb +18 -0
- data/lib/time_crisis/tzinfo/definitions/Pacific/Tongatapu.rb +2 -2
- data/lib/time_crisis/tzinfo/definitions/Pacific/Truk.rb +18 -0
- data/lib/time_crisis/tzinfo/definitions/Pacific/Wake.rb +18 -0
- data/lib/time_crisis/tzinfo/definitions/Pacific/Wallis.rb +18 -0
- data/lib/time_crisis/tzinfo/definitions/Pacific/Yap.rb +13 -0
- data/lib/time_crisis/tzinfo/definitions/Poland.rb +11 -0
- data/lib/time_crisis/tzinfo/definitions/Portugal.rb +11 -0
- data/lib/time_crisis/tzinfo/definitions/ROC.rb +11 -0
- data/lib/time_crisis/tzinfo/definitions/ROK.rb +11 -0
- data/lib/time_crisis/tzinfo/definitions/Singapore.rb +11 -0
- data/lib/time_crisis/tzinfo/definitions/Turkey.rb +11 -0
- data/lib/time_crisis/tzinfo/definitions/UCT.rb +11 -0
- data/lib/time_crisis/tzinfo/definitions/US/Alaska.rb +13 -0
- data/lib/time_crisis/tzinfo/definitions/US/Aleutian.rb +13 -0
- data/lib/time_crisis/tzinfo/definitions/US/Arizona.rb +13 -0
- data/lib/time_crisis/tzinfo/definitions/US/Central.rb +13 -0
- data/lib/time_crisis/tzinfo/definitions/US/East__m__Indiana.rb +13 -0
- data/lib/time_crisis/tzinfo/definitions/US/Eastern.rb +13 -0
- data/lib/time_crisis/tzinfo/definitions/US/Hawaii.rb +13 -0
- data/lib/time_crisis/tzinfo/definitions/US/Indiana__m__Starke.rb +13 -0
- data/lib/time_crisis/tzinfo/definitions/US/Michigan.rb +13 -0
- data/lib/time_crisis/tzinfo/definitions/US/Mountain.rb +13 -0
- data/lib/time_crisis/tzinfo/definitions/US/Pacific.rb +13 -0
- data/lib/time_crisis/tzinfo/definitions/US/Pacific__m__New.rb +13 -0
- data/lib/time_crisis/tzinfo/definitions/US/Samoa.rb +13 -0
- data/lib/time_crisis/tzinfo/definitions/UTC.rb +11 -0
- data/lib/time_crisis/tzinfo/definitions/Universal.rb +11 -0
- data/lib/time_crisis/tzinfo/definitions/WET.rb +163 -0
- data/lib/time_crisis/tzinfo/definitions/W__m__SU.rb +11 -0
- data/lib/time_crisis/tzinfo/definitions/Zulu.rb +11 -0
- data/lib/time_crisis/tzinfo/indexes/timezones.rb +577 -0
- data/lib/time_crisis/tzinfo/time_or_datetime.rb +60 -22
- data/lib/time_crisis/tzinfo/timezone_index_definition.rb +50 -0
- data/lib/time_crisis/tzinfo/timezone_period.rb +4 -4
- data/lib/time_crisis/tzinfo/timezone_proxy.rb +65 -0
- data/lib/time_crisis/weekend.rb +2 -1
- data/time_crisis.gemspec +469 -20
- metadata +471 -35
- data/lib/third_base.rb +0 -2
- data/lib/third_base/compat.rb +0 -405
- data/lib/third_base/compat/date.rb +0 -3
- data/lib/third_base/compat/date/format.rb +0 -3
- data/lib/time_crisis/ext.rb +0 -60
- data/lib/time_crisis/support/acts_like.rb +0 -20
- data/lib/time_crisis/support/advance.rb +0 -25
- data/lib/time_crisis/support/change.rb +0 -47
- data/lib/time_crisis/support/conversions.rb +0 -98
- data/lib/time_crisis/support/current.rb +0 -16
- data/lib/time_crisis/support/readable_inspect.rb +0 -30
@@ -70,3 +70,6 @@ end
|
|
70
70
|
|
71
71
|
::TimeCrisis::Date.extend(TimeCrisis::MeteorologicalSeasons::ClassMethods)
|
72
72
|
::TimeCrisis::Date.send(:include, TimeCrisis::MeteorologicalSeasons::InstanceMethods)
|
73
|
+
::TimeCrisis::DateTime.send(:include, TimeCrisis::MeteorologicalSeasons::InstanceMethods)
|
74
|
+
::TimeCrisis::Time.send(:include, TimeCrisis::MeteorologicalSeasons::InstanceMethods)
|
75
|
+
|
@@ -14,13 +14,16 @@ module TimeCrisis
|
|
14
14
|
def nth_weekday(h={})
|
15
15
|
raise ArgumentError unless h[:nth]
|
16
16
|
nth = h[:nth].to_s == 'last' ? 5 : h[:nth]
|
17
|
+
|
18
|
+
unless h[:year] && h[:month] && h[:weekday]
|
19
|
+
today = self.current
|
20
|
+
|
21
|
+
h[:year] ||= today.year
|
22
|
+
h[:month] ||= today.month
|
23
|
+
h[:weekday] ||= today.wday
|
24
|
+
end
|
17
25
|
|
18
|
-
|
19
|
-
h[:year] ||= today.year
|
20
|
-
h[:month] ||= today.month
|
21
|
-
h[:weekday] ||= today.wday
|
22
|
-
|
23
|
-
target_month = TimeCrisis::Date.new(h[:year], h[:month], 1)
|
26
|
+
target_month = self.civil(h[:year], h[:month], 1)
|
24
27
|
days_in_month = target_month.days_in_month
|
25
28
|
target_weekday = h[:weekday].is_a?(Numeric) ? h[:weekday] : @@days_of_the_week[h[:weekday]]
|
26
29
|
first_weekday = target_month.wday
|
@@ -33,15 +36,7 @@ module TimeCrisis
|
|
33
36
|
day = calculate_day_with_offset(nth, offset)
|
34
37
|
end
|
35
38
|
|
36
|
-
|
37
|
-
STDERR.puts "Arguments: #{h.inspect}"
|
38
|
-
STDERR.puts "Target weekday: #{target_weekday}"
|
39
|
-
STDERR.puts "First weekday: #{first_weekday}"
|
40
|
-
STDERR.puts "Offset: #{offset}"
|
41
|
-
STDERR.puts "Day: #{day}"
|
42
|
-
end
|
43
|
-
|
44
|
-
TimeCrisis::Date.civil(h[:year], h[:month], day)
|
39
|
+
self.civil(h[:year], h[:month], day)
|
45
40
|
end
|
46
41
|
|
47
42
|
private
|
data/lib/time_crisis/support.rb
CHANGED
@@ -1,10 +1,15 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
require 'time_crisis/support/ext/time/publicize_conversion_methods'
|
2
|
+
require 'time_crisis/support/ext/time/marshal_with_utc_flag'
|
3
|
+
require 'time_crisis/support/ext/time/acts_like'
|
4
|
+
require 'time_crisis/support/ext/time/calculations'
|
5
|
+
require 'time_crisis/support/ext/time/conversions'
|
6
|
+
require 'time_crisis/support/ext/time/zones'
|
3
7
|
|
4
|
-
require 'time_crisis/support/
|
5
|
-
require 'time_crisis/support/
|
6
|
-
require 'time_crisis/support/
|
7
|
-
require 'time_crisis/support/advance'
|
8
|
-
require 'time_crisis/support/readable_inspect'
|
9
|
-
require 'time_crisis/support/acts_like'
|
8
|
+
require 'time_crisis/support/ext/date/acts_like'
|
9
|
+
require 'time_crisis/support/ext/date/calculations'
|
10
|
+
require 'time_crisis/support/ext/date/conversions'
|
10
11
|
|
12
|
+
require 'time_crisis/support/ext/date_time/acts_like'
|
13
|
+
require 'time_crisis/support/ext/date_time/calculations'
|
14
|
+
require 'time_crisis/support/ext/date_time/conversions'
|
15
|
+
require 'time_crisis/support/ext/date_time/zones'
|
@@ -0,0 +1,18 @@
|
|
1
|
+
module TimeCrisis
|
2
|
+
if defined? ::BasicObject
|
3
|
+
class BasicObject < ::BasicObject
|
4
|
+
undef_method :==
|
5
|
+
undef_method :equal?
|
6
|
+
|
7
|
+
def raise(*args)
|
8
|
+
::Object.send(:raise, *args)
|
9
|
+
end
|
10
|
+
end
|
11
|
+
else
|
12
|
+
class BasicObject
|
13
|
+
instance_methods.each do |m|
|
14
|
+
undef_method(m) if m.to_s !~ /(?:^__|^nil\?$|^send$|^object_id$)/
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
@@ -0,0 +1,87 @@
|
|
1
|
+
require 'time_crisis/support/basic_object'
|
2
|
+
|
3
|
+
module TimeCrisis
|
4
|
+
class Duration < BasicObject
|
5
|
+
attr_accessor :value, :parts
|
6
|
+
|
7
|
+
def initialize(value, parts) #:nodoc:
|
8
|
+
@value, @parts = value, parts
|
9
|
+
end
|
10
|
+
|
11
|
+
def +(other)
|
12
|
+
if Duration === other
|
13
|
+
Duration.new(value + other.value, @parts + other.parts)
|
14
|
+
else
|
15
|
+
Duration.new(value + other, @parts + [[:seconds, other]])
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
def -(other)
|
20
|
+
self + (-other)
|
21
|
+
end
|
22
|
+
|
23
|
+
def -@ #:nodoc:
|
24
|
+
Duration.new(-value, parts.map { |type,number| [type, -number] })
|
25
|
+
end
|
26
|
+
|
27
|
+
def is_a?(klass) #:nodoc:
|
28
|
+
klass == Duration || super
|
29
|
+
end
|
30
|
+
|
31
|
+
def ==(other)
|
32
|
+
if Duration === other
|
33
|
+
other.value == value
|
34
|
+
else
|
35
|
+
other == value
|
36
|
+
end
|
37
|
+
end
|
38
|
+
|
39
|
+
def self.===(other) #:nodoc:
|
40
|
+
other.is_a?(Duration) rescue super
|
41
|
+
end
|
42
|
+
|
43
|
+
def since(time = ::Time.current)
|
44
|
+
sum(1, time)
|
45
|
+
end
|
46
|
+
alias :from_now :since
|
47
|
+
|
48
|
+
def ago(time = ::Time.current)
|
49
|
+
sum(-1, time)
|
50
|
+
end
|
51
|
+
alias :until :ago
|
52
|
+
|
53
|
+
def inspect #:nodoc:
|
54
|
+
consolidated = parts.inject(::Hash.new(0)) { |h,part| h[part.first] += part.last; h }
|
55
|
+
parts = [:years, :months, :days, :minutes, :seconds].map do |length|
|
56
|
+
n = consolidated[length]
|
57
|
+
# "#{n} #{n == 1 ? length.to_s.singularize : length.to_s}" if n.nonzero?
|
58
|
+
"#{n} #{length}" if n > 0
|
59
|
+
end.compact
|
60
|
+
parts = ["0 seconds"] if parts.empty?
|
61
|
+
# parts.to_sentence(:locale => :en)
|
62
|
+
parts.join(', ')
|
63
|
+
end
|
64
|
+
|
65
|
+
protected
|
66
|
+
|
67
|
+
def sum(sign, time = ::Time.current) #:nodoc:
|
68
|
+
parts.inject(time) do |t,(type,number)|
|
69
|
+
if t.acts_like?(:time) || t.acts_like?(:date)
|
70
|
+
if type == :seconds
|
71
|
+
t.since(sign * number)
|
72
|
+
else
|
73
|
+
t.advance(type => sign * number)
|
74
|
+
end
|
75
|
+
else
|
76
|
+
raise ::ArgumentError, "expected a time or date, got #{time.inspect}"
|
77
|
+
end
|
78
|
+
end
|
79
|
+
end
|
80
|
+
|
81
|
+
private
|
82
|
+
|
83
|
+
def method_missing(method, *args, &block) #:nodoc:
|
84
|
+
value.send(method, *args)
|
85
|
+
end
|
86
|
+
end
|
87
|
+
end
|
@@ -0,0 +1,183 @@
|
|
1
|
+
require 'time_crisis/support/duration'
|
2
|
+
require 'time_crisis/support/ext/time/zones'
|
3
|
+
|
4
|
+
module TimeCrisis
|
5
|
+
class Date
|
6
|
+
class << self
|
7
|
+
def yesterday
|
8
|
+
::TimeCrisis::Date.today.yesterday
|
9
|
+
end
|
10
|
+
|
11
|
+
def tomorrow
|
12
|
+
::TimeCrisis::Date.today.tomorrow
|
13
|
+
end
|
14
|
+
|
15
|
+
def current
|
16
|
+
::TimeCrisis::Time.zone_default ? ::TimeCrisis::Time.zone.today : ::TimeCrisis::Date.today
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
20
|
+
def past?
|
21
|
+
self < ::TimeCrisis::Date.current
|
22
|
+
end
|
23
|
+
|
24
|
+
def today?
|
25
|
+
self.to_tc_date == ::TimeCrisis::Date.current
|
26
|
+
end
|
27
|
+
|
28
|
+
def future?
|
29
|
+
self > ::TimeCrisis::Date.current
|
30
|
+
end
|
31
|
+
|
32
|
+
def ago(seconds)
|
33
|
+
to_tc_time.since(-seconds)
|
34
|
+
end
|
35
|
+
|
36
|
+
def since(seconds)
|
37
|
+
to_tc_time.since(seconds)
|
38
|
+
end
|
39
|
+
alias :in :since
|
40
|
+
|
41
|
+
def beginning_of_day
|
42
|
+
to_tc_time
|
43
|
+
end
|
44
|
+
alias :midnight :beginning_of_day
|
45
|
+
alias :at_midnight :beginning_of_day
|
46
|
+
alias :at_beginning_of_day :beginning_of_day
|
47
|
+
|
48
|
+
def end_of_day
|
49
|
+
to_tc_time.end_of_day
|
50
|
+
end
|
51
|
+
|
52
|
+
def plus_with_duration(other) #:nodoc:
|
53
|
+
if TimeCrisis::Duration === other
|
54
|
+
other.since(self)
|
55
|
+
else
|
56
|
+
plus_without_duration(other)
|
57
|
+
end
|
58
|
+
end
|
59
|
+
alias_method :plus_without_duration, :+
|
60
|
+
alias_method :+, :plus_with_duration
|
61
|
+
|
62
|
+
def minus_with_duration(other) #:nodoc:
|
63
|
+
if TimeCrisis::Duration === other
|
64
|
+
plus_with_duration(-other)
|
65
|
+
else
|
66
|
+
minus_without_duration(other)
|
67
|
+
end
|
68
|
+
end
|
69
|
+
alias_method :minus_without_duration, :-
|
70
|
+
alias_method :-, :minus_with_duration
|
71
|
+
|
72
|
+
def advance(options)
|
73
|
+
options = options.dup
|
74
|
+
d = self
|
75
|
+
d = d >> options.delete(:years) * 12 if options[:years]
|
76
|
+
d = d >> options.delete(:months) if options[:months]
|
77
|
+
d = d + options.delete(:weeks) * 7 if options[:weeks]
|
78
|
+
d = d + options.delete(:days) if options[:days]
|
79
|
+
d
|
80
|
+
end
|
81
|
+
|
82
|
+
def change(options)
|
83
|
+
::TimeCrisis::Date.civil(
|
84
|
+
options[:year] || self.year,
|
85
|
+
options[:month] || self.month,
|
86
|
+
options[:day] || self.day
|
87
|
+
)
|
88
|
+
end
|
89
|
+
|
90
|
+
def months_ago(months)
|
91
|
+
advance(:months => -months)
|
92
|
+
end
|
93
|
+
|
94
|
+
def months_since(months)
|
95
|
+
advance(:months => months)
|
96
|
+
end
|
97
|
+
|
98
|
+
def years_ago(years)
|
99
|
+
advance(:years => -years)
|
100
|
+
end
|
101
|
+
|
102
|
+
def years_since(years)
|
103
|
+
advance(:years => years)
|
104
|
+
end
|
105
|
+
|
106
|
+
def last_year
|
107
|
+
years_ago(1)
|
108
|
+
end
|
109
|
+
|
110
|
+
def next_year
|
111
|
+
years_since(1)
|
112
|
+
end unless method_defined?(:next_year)
|
113
|
+
|
114
|
+
def last_month
|
115
|
+
months_ago(1)
|
116
|
+
end
|
117
|
+
|
118
|
+
def next_month
|
119
|
+
months_since(1)
|
120
|
+
end unless method_defined?(:next_month)
|
121
|
+
|
122
|
+
def beginning_of_week
|
123
|
+
days_to_monday = self.wday!=0 ? self.wday-1 : 6
|
124
|
+
result = self - days_to_monday
|
125
|
+
self.acts_like?(:time) ? result.midnight : result
|
126
|
+
end
|
127
|
+
alias :monday :beginning_of_week
|
128
|
+
alias :at_beginning_of_week :beginning_of_week
|
129
|
+
|
130
|
+
def end_of_week
|
131
|
+
days_to_sunday = self.wday!=0 ? 7-self.wday : 0
|
132
|
+
result = self + days_to_sunday.days
|
133
|
+
self.acts_like?(:time) ? result.end_of_day : result
|
134
|
+
end
|
135
|
+
alias :at_end_of_week :end_of_week
|
136
|
+
|
137
|
+
def next_week(day = :monday)
|
138
|
+
days_into_week = { :monday => 0, :tuesday => 1, :wednesday => 2, :thursday => 3, :friday => 4, :saturday => 5, :sunday => 6}
|
139
|
+
result = (self + 7).beginning_of_week + days_into_week[day]
|
140
|
+
self.acts_like?(:time) ? result.change(:hour => 0) : result
|
141
|
+
end
|
142
|
+
|
143
|
+
def beginning_of_month
|
144
|
+
self.acts_like?(:time) ? change(:day => 1,:hour => 0, :min => 0, :sec => 0) : change(:day => 1)
|
145
|
+
end
|
146
|
+
alias :at_beginning_of_month :beginning_of_month
|
147
|
+
|
148
|
+
def end_of_month
|
149
|
+
last_day = ::TimeCrisis::Time.days_in_month( self.month, self.year )
|
150
|
+
self.acts_like?(:time) ? change(:day => last_day, :hour => 23, :min => 59, :sec => 59) : change(:day => last_day)
|
151
|
+
end
|
152
|
+
alias :at_end_of_month :end_of_month
|
153
|
+
|
154
|
+
def beginning_of_quarter
|
155
|
+
beginning_of_month.change(:month => [10, 7, 4, 1].detect { |m| m <= self.month })
|
156
|
+
end
|
157
|
+
alias :at_beginning_of_quarter :beginning_of_quarter
|
158
|
+
|
159
|
+
def end_of_quarter
|
160
|
+
beginning_of_month.change(:month => [3, 6, 9, 12].detect { |m| m >= self.month }).end_of_month
|
161
|
+
end
|
162
|
+
alias :at_end_of_quarter :end_of_quarter
|
163
|
+
|
164
|
+
def beginning_of_year
|
165
|
+
self.acts_like?(:time) ? change(:month => 1, :day => 1, :hour => 0, :min => 0, :sec => 0) : change(:month => 1, :day => 1)
|
166
|
+
end
|
167
|
+
alias :at_beginning_of_year :beginning_of_year
|
168
|
+
|
169
|
+
def end_of_year
|
170
|
+
self.acts_like?(:time) ? change(:month => 12,:day => 31,:hour => 23, :min => 59, :sec => 59) : change(:month => 12, :day => 31)
|
171
|
+
end
|
172
|
+
alias :at_end_of_year :end_of_year
|
173
|
+
|
174
|
+
def yesterday
|
175
|
+
self - 1
|
176
|
+
end
|
177
|
+
|
178
|
+
def tomorrow
|
179
|
+
self + 1
|
180
|
+
end
|
181
|
+
end
|
182
|
+
|
183
|
+
end
|
@@ -0,0 +1,60 @@
|
|
1
|
+
module TimeCrisis
|
2
|
+
class Date
|
3
|
+
DATE_FORMATS = {
|
4
|
+
:short => "%e %b",
|
5
|
+
:long => "%B %e, %Y",
|
6
|
+
:db => "%Y-%m-%d",
|
7
|
+
:number => "%Y%m%d",
|
8
|
+
:rfc822 => "%e %b %Y"
|
9
|
+
}
|
10
|
+
|
11
|
+
def to_formatted_s(format = :default)
|
12
|
+
if formatter = DATE_FORMATS[format]
|
13
|
+
if formatter.respond_to?(:call)
|
14
|
+
formatter.call(self).to_s
|
15
|
+
else
|
16
|
+
strftime(formatter)
|
17
|
+
end
|
18
|
+
else
|
19
|
+
to_default_s
|
20
|
+
end
|
21
|
+
end
|
22
|
+
alias_method :to_default_s, :to_s
|
23
|
+
alias_method :to_s, :to_formatted_s
|
24
|
+
|
25
|
+
def readable_inspect
|
26
|
+
"#<TimeCrisis::Date #{strftime('%a, %d %b %Y')}>"
|
27
|
+
end
|
28
|
+
alias_method :default_inspect, :inspect
|
29
|
+
alias_method :inspect, :readable_inspect
|
30
|
+
|
31
|
+
def to_tc_date
|
32
|
+
self
|
33
|
+
end
|
34
|
+
|
35
|
+
def to_tc_datetime
|
36
|
+
::TimeCrisis::DateTime.civil(year, month, day, 0, 0, 0, 0)
|
37
|
+
end
|
38
|
+
|
39
|
+
def to_tc_time(form = :local)
|
40
|
+
::TimeCrisis::Time.send(form, year, month, day)
|
41
|
+
end
|
42
|
+
|
43
|
+
def to_date
|
44
|
+
::Date.civil(year, month, day)
|
45
|
+
end
|
46
|
+
|
47
|
+
def to_datetime
|
48
|
+
::DateTime.civil(year, month, day, 0, 0, 0, 0)
|
49
|
+
end
|
50
|
+
|
51
|
+
def to_time(form = :local)
|
52
|
+
::Time.send(form, year, month, day)
|
53
|
+
end
|
54
|
+
|
55
|
+
def xmlschema
|
56
|
+
to_tc_datetime.xmlschema
|
57
|
+
end
|
58
|
+
|
59
|
+
end
|
60
|
+
end
|