From f9f5b97f6289a151cb74d4a4285d6bfd7046c9eb Mon Sep 17 00:00:00 2001 From: Kenneth Reitz Date: Tue, 23 May 2017 11:27:03 -0700 Subject: [PATCH 1/2] Update README.rst --- README.rst | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/README.rst b/README.rst index 990f253..0997fb3 100644 --- a/README.rst +++ b/README.rst @@ -77,6 +77,26 @@ Behold, datetimes for humans! >>> maya.interval(start=maya.now(), end=maya.now().add(days=1), interval=60*60) +☤ Advanced Usage of Maya +------------------------ + +In addition to timestamps, Maya also includes a wonderfuly powerful ``MayaInterval`` class, which represents a range of time (e.g. an event). With this class, you can perform a multitude of advanced calendar calculations with finese and ease. + +For example:: + +.. code-block:: pycon + + >>> from maya import MayaInterval + + >>> event_start = maya.now() + >>> event_end = event_start.add(hours=1) + + >>> event = MayaInterval(start=event_start, end=event_end) + >>> event + + + + ☤ Why is this useful? --------------------- From 704af5a3a0e884c22b8ca262ceb48b659ac1ccab Mon Sep 17 00:00:00 2001 From: Kenneth Reitz Date: Tue, 23 May 2017 11:27:47 -0700 Subject: [PATCH 2/2] Update README.rst --- README.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.rst b/README.rst index 0997fb3..7032c47 100644 --- a/README.rst +++ b/README.rst @@ -82,7 +82,7 @@ Behold, datetimes for humans! In addition to timestamps, Maya also includes a wonderfuly powerful ``MayaInterval`` class, which represents a range of time (e.g. an event). With this class, you can perform a multitude of advanced calendar calculations with finese and ease. -For example:: +For example: .. code-block:: pycon