README.md in et-orbi-1.2.4 vs README.md in et-orbi-1.2.5

- old
+ new

@@ -1,10 +1,9 @@ # et-orbi -[![Build Status](https://secure.travis-ci.org/floraison/et-orbi.svg)](http://travis-ci.org/floraison/et-orbi) -[![Build status](https://ci.appveyor.com/api/projects/status/6tbo9lk9qdor8ipl?svg=true)](https://ci.appveyor.com/project/jmettraux/et-orbi) +[![tests](https://github.com/floraison/et-orbi/workflows/test/badge.svg)](https://github.com/floraison/et-orbi/actions) [![Gem Version](https://badge.fury.io/rb/et-orbi.svg)](http://badge.fury.io/rb/et-orbi) [![Join the chat at https://gitter.im/floraison/fugit](https://badges.gitter.im/floraison/fugit.svg)](https://gitter.im/floraison/fugit?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) Time zones for [fugit](https://github.com/floraison/fugit) and for [rufus-scheduler](https://github.com/jmettraux/rufus-scheduler). Urbi et Orbi. @@ -14,10 +13,12 @@ ```ruby require 'et-orbi' EtOrbi.now # => #<EtOrbi::EoTime:0x007f94d94 ...> +EtOrbi.now('Asia/Singapore') + # => #<EtOrbi::EoTime:0x39c96e48 @time=nil, @zone=#<TZInfo::DataTimezone: Asia/Singapore>...> EtOrbi.parse('2017-12-13 13:00:00 America/Jamaica') # => #<EtOrbi::EoTime:0x007f94d90 @zone=#<TZInfo::DataTimezone: America/Jamaica>...> EtOrbi.make_time(Time.now) # => #<EtOrbi::EoTime:0x007f94d91 ...> @@ -73,11 +74,14 @@ By default, et-orbi relies on [Chronic](https://github.com/mojombo/chronic) to parse strings like "tomorrow" or "friday 1pm", if `Chronic` is present. ```ruby EtOrbi.parse('tomorrow') - # => #<EtOrbi::EoTime:0x007fbc6aa8a560 @seconds=1575687600.0, @zone=#<TZInfo::TimezoneProxy: Asia/Tokyo>, @time=nil> + # => #<EtOrbi::EoTime:0x007fbc6aa8a560 + # @seconds=1575687600.0, + # @zone=#<TZInfo::TimezoneProxy: Asia/Tokyo>, + # @time=nil> EtOrbi.parse('tomorrow').to_s # => "2019-12-07 12:00:00 +0900" ``` This is a poor design choice I replicated from [rufus-scheduler](https://github.com/jmettraux/rufus-scheduler). @@ -88,13 +92,16 @@ ```ruby EtOrbi.parse(Chronic.parse('tomorrow').to_s).to_s # => "2019-12-07 12:00:00 +0900" ``` -If one has Chronic present in his project but doesn't want it to interfere with et-orbi, it can be disabled at `parse` call: +If one has Chronic present in their project but doesn't want it to interfere with et-orbi, it can be disabled at `parse` call: ```ruby EtOrbi.parse('tomorrow') - # => #<EtOrbi::EoTime:0x007ffb5b2a2390 @seconds=1575687600.0, @zone=#<TZInfo::TimezoneProxy: Asia/Tokyo>, @time=nil> + # => #<EtOrbi::EoTime:0x007ffb5b2a2390 + # @seconds=1575687600.0, + # @zone=#<TZInfo::TimezoneProxy: Asia/Tokyo>, + # @time=nil> EtOrbi.parse('tomorrow', enable_chronic: false) # ArgumentError: No time information in "tomorrow" # from /home/jmettraux/w/et-orbi/lib/et-orbi/make.rb:31:in `rescue in parse' ``` or at the et-orbi level: