diff --git a/docs/pyjalali/.buildinfo b/docs/pyjalali/.buildinfo deleted file mode 100644 index 0f65e35..0000000 --- a/docs/pyjalali/.buildinfo +++ /dev/null @@ -1,4 +0,0 @@ -# Sphinx build info version 1 -# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. -config: c4e17040eca6b1bf715db83f9ecfca3e -tags: fbb0d17656682115ca4d033fb2f83ba1 diff --git a/docs/pyjalali/.doctrees/api.doctree b/docs/pyjalali/.doctrees/api.doctree deleted file mode 100644 index 45dba6e..0000000 Binary files a/docs/pyjalali/.doctrees/api.doctree and /dev/null differ diff --git a/docs/pyjalali/.doctrees/environment.pickle b/docs/pyjalali/.doctrees/environment.pickle deleted file mode 100644 index f60ca6f..0000000 Binary files a/docs/pyjalali/.doctrees/environment.pickle and /dev/null differ diff --git a/docs/pyjalali/.doctrees/index.doctree b/docs/pyjalali/.doctrees/index.doctree deleted file mode 100644 index 249e1a8..0000000 Binary files a/docs/pyjalali/.doctrees/index.doctree and /dev/null differ diff --git a/docs/pyjalali/.doctrees/intro.doctree b/docs/pyjalali/.doctrees/intro.doctree deleted file mode 100644 index c0e1a8b..0000000 Binary files a/docs/pyjalali/.doctrees/intro.doctree and /dev/null differ diff --git a/docs/pyjalali/.doctrees/modules.doctree b/docs/pyjalali/.doctrees/modules.doctree deleted file mode 100644 index 6fcd07a..0000000 Binary files a/docs/pyjalali/.doctrees/modules.doctree and /dev/null differ diff --git a/docs/pyjalali/.doctrees/pyjalali.doctree b/docs/pyjalali/.doctrees/pyjalali.doctree deleted file mode 100644 index f806748..0000000 Binary files a/docs/pyjalali/.doctrees/pyjalali.doctree and /dev/null differ diff --git a/docs/pyjalali/_sources/index.txt b/docs/pyjalali/_sources/index.txt deleted file mode 100644 index 6bbeb13..0000000 --- a/docs/pyjalali/_sources/index.txt +++ /dev/null @@ -1,23 +0,0 @@ -.. pyjalali documentation master file, created by - sphinx-quickstart on Thu Feb 20 11:55:27 2014. - You can adapt this file completely to your liking, but it should at least - contain the root `toctree` directive. - -Welcome to pyjalali's documentation! -==================================== - -Contents: - -.. toctree:: - :maxdepth: 2 - - intro - pyjalali - -Indices and tables -================== - -* :ref:`genindex` -* :ref:`modindex` -* :ref:`search` - diff --git a/docs/pyjalali/_sources/intro.txt b/docs/pyjalali/_sources/intro.txt deleted file mode 100644 index 9c150bc..0000000 --- a/docs/pyjalali/_sources/intro.txt +++ /dev/null @@ -1,90 +0,0 @@ -Introduction -============ - -This page introduce pyjalali to you. If you want rather head into class and -methods' documentation see :ref:`modindex`. - -Install -------- - -In jcal source directory navigate to subdirectory *sources* and run ``python -setup.py install``. You must have libjalali installed before. - -Usage ------ -You can use most functionalities of standard datetime module by -:mod:`pyjalali.datetime`: - - >>> from pyjalali.datetime import datetime - >>> datetime.now() - ... pyjalali.datetime.datetime(1392, 12, 1, 23, 40, 18, 772116) - >>> datetime.today() - datetime(1367, 11 1) - ... datetime.timedelta(30, 85313, 805141) - -There is also :class:`pyjalali.datetime.date`: - - >>> from pyjalali.datetime import date - >>> date.today().isoformat() - ... '1392-12-01' - -You can make timezone aware datetimes: - >>> from pytz import timezone - >>> now_in_teh = datetime.now(timezone('Asia/Tehran')) - >>> # see current time in another area - >>> in_amsterdam = now_in_teh.astimezone(timezone('Europe/Amsterdam')) - >>> print now_in_teh.time(), in_amsterdam.time() - ... 10:42:03.233978 08:12:03.233978 - >>> in_amsterdam == now_in_teh - ... True - -To convert between Hijri Shamsi and Gregorian calendars, you can use functions -:func:`~.datetime.jalali_from_gregorian` and -:func:`~.datetime.gregorian_from_jalali` (or respectively -:func:`~.datetime.g2j` and :func:`~.datetime.j2g` for short). Also you can use -:attr:`.datetime.datetime.gregorian` to get equal datetime in Gregorian -calendar. This will be cached for future uses: - - >>> from datetime import datetime as _std_datetime, date as _std_date - >>> from pyjalali.datetime import jalali_from_gregorian, gregorian_from_jalali, datetime, date - >>> jd = datetime(1389, 21, 11, 12, 23, 10) - >>> gd = jd.gregorian - >>> print gd, jd - ... 2011-01-30 18:23:10 1389-11-10 18:23:10 - >>> gregorian_from_jalali(jd) == gd - ... True - >>> jalali_from_gregorian(_std_date.today()) - ... pyjalali.datetime.date(1392, 12, 2) - -Note unlike many Hijri Shamsi implementations, libjalali doesn't work by -converting dates to Gregorian and forwarding operations to Gregorian date. -It's a Hijri Shamsi calendar implementation from base. The only place -pyjalali converts Hijri Shamsi date to Gregorian internally, is to work with -`pytz`_ package in timezone aware datetimes. So keep in mind libjalali -doesn't offer a general converter for dates before UNIX Epoch and pyjalali -converters will fail for them. - -.. _pytz: http://pypi.python.org/pypi/pytz - -If you need to invoke libjalali library functions directly, you can use wrapper -functions. :mod:`~.jtime` contains libjalali time functions. Functions used -internally by libjalali resides in :mod:`~.jalali`. :mod:`~.jstr` contains -functions for converting between dates and string representation. Core -libjalali data structures are simulated in :mod:`~.types`. - - >>> from pyjalali.jtime import jlocaltime - >>> print jlocaltime(int(time())) - ... 1392/11/2 11-29-11 +12600 (IRST) - -.. note:: - You can use functions :func:`.datetime.now` and :func:`.datetime.utcnow` in module level: - >>> from pyjalali.datetime import utcnow - >>> utcnow() - ... pyjalali.datetime.datetime(1392, 12, 1, 20, 18, 27, 651499) - -Version -------- -pyjalali is a very thin wrapper around libjalali. Package's version you see -in :attr:`pyjalali.__init__.__version__` cosists of 3 numbers describing -version of libjalali which pyjalali supposed to work with it and another -number that is revision of pyjalali itself. So ``0.6.11.92`` would expected -to work with libjalali version ``0.6.11``. diff --git a/docs/pyjalali/_sources/pyjalali.txt b/docs/pyjalali/_sources/pyjalali.txt deleted file mode 100644 index fa54f92..0000000 --- a/docs/pyjalali/_sources/pyjalali.txt +++ /dev/null @@ -1,45 +0,0 @@ -pyjalali Package -================ - -:mod:`pyjalali` Package ------------------------ - -.. automodule:: pyjalali.__init__ - :members: - :undoc-members: - -:mod:`.datetime` Module ------------------------ - -.. automodule:: pyjalali.datetime - :members: - :undoc-members: - -:mod:`jalali` Module --------------------- - -.. automodule:: pyjalali.jalali - :members: - :undoc-members: - -:mod:`jstr` Module ------------------- - -.. automodule:: pyjalali.jstr - :members: - :undoc-members: - -:mod:`jtime` Module -------------------- - -.. automodule:: pyjalali.jtime - :members: - :undoc-members: - -:mod:`types` Module -------------------- - -.. automodule:: pyjalali.types - :members: - :undoc-members: - diff --git a/docs/pyjalali/_static/ajax-loader.gif b/docs/pyjalali/_static/ajax-loader.gif deleted file mode 100644 index 61faf8c..0000000 Binary files a/docs/pyjalali/_static/ajax-loader.gif and /dev/null differ diff --git a/docs/pyjalali/_static/basic.css b/docs/pyjalali/_static/basic.css deleted file mode 100644 index 967e36c..0000000 --- a/docs/pyjalali/_static/basic.css +++ /dev/null @@ -1,537 +0,0 @@ -/* - * basic.css - * ~~~~~~~~~ - * - * Sphinx stylesheet -- basic theme. - * - * :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. - * :license: BSD, see LICENSE for details. - * - */ - -/* -- main layout ----------------------------------------------------------- */ - -div.clearer { - clear: both; -} - -/* -- relbar ---------------------------------------------------------------- */ - -div.related { - width: 100%; - font-size: 90%; -} - -div.related h3 { - display: none; -} - -div.related ul { - margin: 0; - padding: 0 0 0 10px; - list-style: none; -} - -div.related li { - display: inline; -} - -div.related li.right { - float: right; - margin-right: 5px; -} - -/* -- sidebar --------------------------------------------------------------- */ - -div.sphinxsidebarwrapper { - padding: 10px 5px 0 10px; -} - -div.sphinxsidebar { - float: left; - width: 230px; - margin-left: -100%; - font-size: 90%; -} - -div.sphinxsidebar ul { - list-style: none; -} - -div.sphinxsidebar ul ul, -div.sphinxsidebar ul.want-points { - margin-left: 20px; - list-style: square; -} - -div.sphinxsidebar ul ul { - margin-top: 0; - margin-bottom: 0; -} - -div.sphinxsidebar form { - margin-top: 10px; -} - -div.sphinxsidebar input { - border: 1px solid #98dbcc; - font-family: sans-serif; - font-size: 1em; -} - -div.sphinxsidebar #searchbox input[type="text"] { - width: 170px; -} - -div.sphinxsidebar #searchbox input[type="submit"] { - width: 30px; -} - -img { - border: 0; - max-width: 100%; -} - -/* -- search page ----------------------------------------------------------- */ - -ul.search { - margin: 10px 0 0 20px; - padding: 0; -} - -ul.search li { - padding: 5px 0 5px 20px; - background-image: url(file.png); - background-repeat: no-repeat; - background-position: 0 7px; -} - -ul.search li a { - font-weight: bold; -} - -ul.search li div.context { - color: #888; - margin: 2px 0 0 30px; - text-align: left; -} - -ul.keywordmatches li.goodmatch a { - font-weight: bold; -} - -/* -- index page ------------------------------------------------------------ */ - -table.contentstable { - width: 90%; -} - -table.contentstable p.biglink { - line-height: 150%; -} - -a.biglink { - font-size: 1.3em; -} - -span.linkdescr { - font-style: italic; - padding-top: 5px; - font-size: 90%; -} - -/* -- general index --------------------------------------------------------- */ - -table.indextable { - width: 100%; -} - -table.indextable td { - text-align: left; - vertical-align: top; -} - -table.indextable dl, table.indextable dd { - margin-top: 0; - margin-bottom: 0; -} - -table.indextable tr.pcap { - height: 10px; -} - -table.indextable tr.cap { - margin-top: 10px; - background-color: #f2f2f2; -} - -img.toggler { - margin-right: 3px; - margin-top: 3px; - cursor: pointer; -} - -div.modindex-jumpbox { - border-top: 1px solid #ddd; - border-bottom: 1px solid #ddd; - margin: 1em 0 1em 0; - padding: 0.4em; -} - -div.genindex-jumpbox { - border-top: 1px solid #ddd; - border-bottom: 1px solid #ddd; - margin: 1em 0 1em 0; - padding: 0.4em; -} - -/* -- general body styles --------------------------------------------------- */ - -a.headerlink { - visibility: hidden; -} - -h1:hover > a.headerlink, -h2:hover > a.headerlink, -h3:hover > a.headerlink, -h4:hover > a.headerlink, -h5:hover > a.headerlink, -h6:hover > a.headerlink, -dt:hover > a.headerlink { - visibility: visible; -} - -div.body p.caption { - text-align: inherit; -} - -div.body td { - text-align: left; -} - -.field-list ul { - padding-left: 1em; -} - -.first { - margin-top: 0 !important; -} - -p.rubric { - margin-top: 30px; - font-weight: bold; -} - -img.align-left, .figure.align-left, object.align-left { - clear: left; - float: left; - margin-right: 1em; -} - -img.align-right, .figure.align-right, object.align-right { - clear: right; - float: right; - margin-left: 1em; -} - -img.align-center, .figure.align-center, object.align-center { - display: block; - margin-left: auto; - margin-right: auto; -} - -.align-left { - text-align: left; -} - -.align-center { - text-align: center; -} - -.align-right { - text-align: right; -} - -/* -- sidebars -------------------------------------------------------------- */ - -div.sidebar { - margin: 0 0 0.5em 1em; - border: 1px solid #ddb; - padding: 7px 7px 0 7px; - background-color: #ffe; - width: 40%; - float: right; -} - -p.sidebar-title { - font-weight: bold; -} - -/* -- topics ---------------------------------------------------------------- */ - -div.topic { - border: 1px solid #ccc; - padding: 7px 7px 0 7px; - margin: 10px 0 10px 0; -} - -p.topic-title { - font-size: 1.1em; - font-weight: bold; - margin-top: 10px; -} - -/* -- admonitions ----------------------------------------------------------- */ - -div.admonition { - margin-top: 10px; - margin-bottom: 10px; - padding: 7px; -} - -div.admonition dt { - font-weight: bold; -} - -div.admonition dl { - margin-bottom: 0; -} - -p.admonition-title { - margin: 0px 10px 5px 0px; - font-weight: bold; -} - -div.body p.centered { - text-align: center; - margin-top: 25px; -} - -/* -- tables ---------------------------------------------------------------- */ - -table.docutils { - border: 0; - border-collapse: collapse; -} - -table.docutils td, table.docutils th { - padding: 1px 8px 1px 5px; - border-top: 0; - border-left: 0; - border-right: 0; - border-bottom: 1px solid #aaa; -} - -table.field-list td, table.field-list th { - border: 0 !important; -} - -table.footnote td, table.footnote th { - border: 0 !important; -} - -th { - text-align: left; - padding-right: 5px; -} - -table.citation { - border-left: solid 1px gray; - margin-left: 1px; -} - -table.citation td { - border-bottom: none; -} - -/* -- other body styles ----------------------------------------------------- */ - -ol.arabic { - list-style: decimal; -} - -ol.loweralpha { - list-style: lower-alpha; -} - -ol.upperalpha { - list-style: upper-alpha; -} - -ol.lowerroman { - list-style: lower-roman; -} - -ol.upperroman { - list-style: upper-roman; -} - -dl { - margin-bottom: 15px; -} - -dd p { - margin-top: 0px; -} - -dd ul, dd table { - margin-bottom: 10px; -} - -dd { - margin-top: 3px; - margin-bottom: 10px; - margin-left: 30px; -} - -dt:target, .highlighted { - background-color: #fbe54e; -} - -dl.glossary dt { - font-weight: bold; - font-size: 1.1em; -} - -.field-list ul { - margin: 0; - padding-left: 1em; -} - -.field-list p { - margin: 0; -} - -.optional { - font-size: 1.3em; -} - -.versionmodified { - font-style: italic; -} - -.system-message { - background-color: #fda; - padding: 5px; - border: 3px solid red; -} - -.footnote:target { - background-color: #ffa; -} - -.line-block { - display: block; - margin-top: 1em; - margin-bottom: 1em; -} - -.line-block .line-block { - margin-top: 0; - margin-bottom: 0; - margin-left: 1.5em; -} - -.guilabel, .menuselection { - font-family: sans-serif; -} - -.accelerator { - text-decoration: underline; -} - -.classifier { - font-style: oblique; -} - -abbr, acronym { - border-bottom: dotted 1px; - cursor: help; -} - -/* -- code displays --------------------------------------------------------- */ - -pre { - overflow: auto; - overflow-y: hidden; /* fixes display issues on Chrome browsers */ -} - -td.linenos pre { - padding: 5px 0px; - border: 0; - background-color: transparent; - color: #aaa; -} - -table.highlighttable { - margin-left: 0.5em; -} - -table.highlighttable td { - padding: 0 0.5em 0 0.5em; -} - -tt.descname { - background-color: transparent; - font-weight: bold; - font-size: 1.2em; -} - -tt.descclassname { - background-color: transparent; -} - -tt.xref, a tt { - background-color: transparent; - font-weight: bold; -} - -h1 tt, h2 tt, h3 tt, h4 tt, h5 tt, h6 tt { - background-color: transparent; -} - -.viewcode-link { - float: right; -} - -.viewcode-back { - float: right; - font-family: sans-serif; -} - -div.viewcode-block:target { - margin: -1px -10px; - padding: 0 10px; -} - -/* -- math display ---------------------------------------------------------- */ - -img.math { - vertical-align: middle; -} - -div.body div.math p { - text-align: center; -} - -span.eqno { - float: right; -} - -/* -- printout stylesheet --------------------------------------------------- */ - -@media print { - div.document, - div.documentwrapper, - div.bodywrapper { - margin: 0 !important; - width: 100%; - } - - div.sphinxsidebar, - div.related, - div.footer, - #top-link { - display: none; - } -} \ No newline at end of file diff --git a/docs/pyjalali/_static/comment-bright.png b/docs/pyjalali/_static/comment-bright.png deleted file mode 100644 index 551517b..0000000 Binary files a/docs/pyjalali/_static/comment-bright.png and /dev/null differ diff --git a/docs/pyjalali/_static/comment-close.png b/docs/pyjalali/_static/comment-close.png deleted file mode 100644 index 09b54be..0000000 Binary files a/docs/pyjalali/_static/comment-close.png and /dev/null differ diff --git a/docs/pyjalali/_static/comment.png b/docs/pyjalali/_static/comment.png deleted file mode 100644 index 92feb52..0000000 Binary files a/docs/pyjalali/_static/comment.png and /dev/null differ diff --git a/docs/pyjalali/_static/default.css b/docs/pyjalali/_static/default.css deleted file mode 100644 index 5f1399a..0000000 --- a/docs/pyjalali/_static/default.css +++ /dev/null @@ -1,256 +0,0 @@ -/* - * default.css_t - * ~~~~~~~~~~~~~ - * - * Sphinx stylesheet -- default theme. - * - * :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. - * :license: BSD, see LICENSE for details. - * - */ - -@import url("basic.css"); - -/* -- page layout ----------------------------------------------------------- */ - -body { - font-family: sans-serif; - font-size: 100%; - background-color: #11303d; - color: #000; - margin: 0; - padding: 0; -} - -div.document { - background-color: #1c4e63; -} - -div.documentwrapper { - float: left; - width: 100%; -} - -div.bodywrapper { - margin: 0 0 0 230px; -} - -div.body { - background-color: #ffffff; - color: #000000; - padding: 0 20px 30px 20px; -} - -div.footer { - color: #ffffff; - width: 100%; - padding: 9px 0 9px 0; - text-align: center; - font-size: 75%; -} - -div.footer a { - color: #ffffff; - text-decoration: underline; -} - -div.related { - background-color: #133f52; - line-height: 30px; - color: #ffffff; -} - -div.related a { - color: #ffffff; -} - -div.sphinxsidebar { -} - -div.sphinxsidebar h3 { - font-family: 'Trebuchet MS', sans-serif; - color: #ffffff; - font-size: 1.4em; - font-weight: normal; - margin: 0; - padding: 0; -} - -div.sphinxsidebar h3 a { - color: #ffffff; -} - -div.sphinxsidebar h4 { - font-family: 'Trebuchet MS', sans-serif; - color: #ffffff; - font-size: 1.3em; - font-weight: normal; - margin: 5px 0 0 0; - padding: 0; -} - -div.sphinxsidebar p { - color: #ffffff; -} - -div.sphinxsidebar p.topless { - margin: 5px 10px 10px 10px; -} - -div.sphinxsidebar ul { - margin: 10px; - padding: 0; - color: #ffffff; -} - -div.sphinxsidebar a { - color: #98dbcc; -} - -div.sphinxsidebar input { - border: 1px solid #98dbcc; - font-family: sans-serif; - font-size: 1em; -} - - - -/* -- hyperlink styles ------------------------------------------------------ */ - -a { - color: #355f7c; - text-decoration: none; -} - -a:visited { - color: #355f7c; - text-decoration: none; -} - -a:hover { - text-decoration: underline; -} - - - -/* -- body styles ----------------------------------------------------------- */ - -div.body h1, -div.body h2, -div.body h3, -div.body h4, -div.body h5, -div.body h6 { - font-family: 'Trebuchet MS', sans-serif; - background-color: #f2f2f2; - font-weight: normal; - color: #20435c; - border-bottom: 1px solid #ccc; - margin: 20px -20px 10px -20px; - padding: 3px 0 3px 10px; -} - -div.body h1 { margin-top: 0; font-size: 200%; } -div.body h2 { font-size: 160%; } -div.body h3 { font-size: 140%; } -div.body h4 { font-size: 120%; } -div.body h5 { font-size: 110%; } -div.body h6 { font-size: 100%; } - -a.headerlink { - color: #c60f0f; - font-size: 0.8em; - padding: 0 4px 0 4px; - text-decoration: none; -} - -a.headerlink:hover { - background-color: #c60f0f; - color: white; -} - -div.body p, div.body dd, div.body li { - text-align: justify; - line-height: 130%; -} - -div.admonition p.admonition-title + p { - display: inline; -} - -div.admonition p { - margin-bottom: 5px; -} - -div.admonition pre { - margin-bottom: 5px; -} - -div.admonition ul, div.admonition ol { - margin-bottom: 5px; -} - -div.note { - background-color: #eee; - border: 1px solid #ccc; -} - -div.seealso { - background-color: #ffc; - border: 1px solid #ff6; -} - -div.topic { - background-color: #eee; -} - -div.warning { - background-color: #ffe4e4; - border: 1px solid #f66; -} - -p.admonition-title { - display: inline; -} - -p.admonition-title:after { - content: ":"; -} - -pre { - padding: 5px; - background-color: #eeffcc; - color: #333333; - line-height: 120%; - border: 1px solid #ac9; - border-left: none; - border-right: none; -} - -tt { - background-color: #ecf0f3; - padding: 0 1px 0 1px; - font-size: 0.95em; -} - -th { - background-color: #ede; -} - -.warning tt { - background: #efc2c2; -} - -.note tt { - background: #d6d6d6; -} - -.viewcode-back { - font-family: sans-serif; -} - -div.viewcode-block:target { - background-color: #f4debf; - border-top: 1px solid #ac9; - border-bottom: 1px solid #ac9; -} \ No newline at end of file diff --git a/docs/pyjalali/_static/doctools.js b/docs/pyjalali/_static/doctools.js deleted file mode 100644 index c5455c9..0000000 --- a/docs/pyjalali/_static/doctools.js +++ /dev/null @@ -1,238 +0,0 @@ -/* - * doctools.js - * ~~~~~~~~~~~ - * - * Sphinx JavaScript utilities for all documentation. - * - * :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. - * :license: BSD, see LICENSE for details. - * - */ - -/** - * select a different prefix for underscore - */ -$u = _.noConflict(); - -/** - * make the code below compatible with browsers without - * an installed firebug like debugger -if (!window.console || !console.firebug) { - var names = ["log", "debug", "info", "warn", "error", "assert", "dir", - "dirxml", "group", "groupEnd", "time", "timeEnd", "count", "trace", - "profile", "profileEnd"]; - window.console = {}; - for (var i = 0; i < names.length; ++i) - window.console[names[i]] = function() {}; -} - */ - -/** - * small helper function to urldecode strings - */ -jQuery.urldecode = function(x) { - return decodeURIComponent(x).replace(/\+/g, ' '); -}; - -/** - * small helper function to urlencode strings - */ -jQuery.urlencode = encodeURIComponent; - -/** - * This function returns the parsed url parameters of the - * current request. Multiple values per key are supported, - * it will always return arrays of strings for the value parts. - */ -jQuery.getQueryParameters = function(s) { - if (typeof s == 'undefined') - s = document.location.search; - var parts = s.substr(s.indexOf('?') + 1).split('&'); - var result = {}; - for (var i = 0; i < parts.length; i++) { - var tmp = parts[i].split('=', 2); - var key = jQuery.urldecode(tmp[0]); - var value = jQuery.urldecode(tmp[1]); - if (key in result) - result[key].push(value); - else - result[key] = [value]; - } - return result; -}; - -/** - * highlight a given string on a jquery object by wrapping it in - * span elements with the given class name. - */ -jQuery.fn.highlightText = function(text, className) { - function highlight(node) { - if (node.nodeType == 3) { - var val = node.nodeValue; - var pos = val.toLowerCase().indexOf(text); - if (pos >= 0 && !jQuery(node.parentNode).hasClass(className)) { - var span = document.createElement("span"); - span.className = className; - span.appendChild(document.createTextNode(val.substr(pos, text.length))); - node.parentNode.insertBefore(span, node.parentNode.insertBefore( - document.createTextNode(val.substr(pos + text.length)), - node.nextSibling)); - node.nodeValue = val.substr(0, pos); - } - } - else if (!jQuery(node).is("button, select, textarea")) { - jQuery.each(node.childNodes, function() { - highlight(this); - }); - } - } - return this.each(function() { - highlight(this); - }); -}; - -/** - * Small JavaScript module for the documentation. - */ -var Documentation = { - - init : function() { - this.fixFirefoxAnchorBug(); - this.highlightSearchWords(); - this.initIndexTable(); - }, - - /** - * i18n support - */ - TRANSLATIONS : {}, - PLURAL_EXPR : function(n) { return n == 1 ? 0 : 1; }, - LOCALE : 'unknown', - - // gettext and ngettext don't access this so that the functions - // can safely bound to a different name (_ = Documentation.gettext) - gettext : function(string) { - var translated = Documentation.TRANSLATIONS[string]; - if (typeof translated == 'undefined') - return string; - return (typeof translated == 'string') ? translated : translated[0]; - }, - - ngettext : function(singular, plural, n) { - var translated = Documentation.TRANSLATIONS[singular]; - if (typeof translated == 'undefined') - return (n == 1) ? singular : plural; - return translated[Documentation.PLURALEXPR(n)]; - }, - - addTranslations : function(catalog) { - for (var key in catalog.messages) - this.TRANSLATIONS[key] = catalog.messages[key]; - this.PLURAL_EXPR = new Function('n', 'return +(' + catalog.plural_expr + ')'); - this.LOCALE = catalog.locale; - }, - - /** - * add context elements like header anchor links - */ - addContextElements : function() { - $('div[id] > :header:first').each(function() { - $('\u00B6'). - attr('href', '#' + this.id). - attr('title', _('Permalink to this headline')). - appendTo(this); - }); - $('dt[id]').each(function() { - $('\u00B6'). - attr('href', '#' + this.id). - attr('title', _('Permalink to this definition')). - appendTo(this); - }); - }, - - /** - * workaround a firefox stupidity - */ - fixFirefoxAnchorBug : function() { - if (document.location.hash && $.browser.mozilla) - window.setTimeout(function() { - document.location.href += ''; - }, 10); - }, - - /** - * highlight the search words provided in the url in the text - */ - highlightSearchWords : function() { - var params = $.getQueryParameters(); - var terms = (params.highlight) ? params.highlight[0].split(/\s+/) : []; - if (terms.length) { - var body = $('div.body'); - if (!body.length) { - body = $('body'); - } - window.setTimeout(function() { - $.each(terms, function() { - body.highlightText(this.toLowerCase(), 'highlighted'); - }); - }, 10); - $('
' + _('Hide Search Matches') + '
') - .appendTo($('#searchbox')); - } - }, - - /** - * init the domain index toggle buttons - */ - initIndexTable : function() { - var togglers = $('img.toggler').click(function() { - var src = $(this).attr('src'); - var idnum = $(this).attr('id').substr(7); - $('tr.cg-' + idnum).toggle(); - if (src.substr(-9) == 'minus.png') - $(this).attr('src', src.substr(0, src.length-9) + 'plus.png'); - else - $(this).attr('src', src.substr(0, src.length-8) + 'minus.png'); - }).css('display', ''); - if (DOCUMENTATION_OPTIONS.COLLAPSE_INDEX) { - togglers.click(); - } - }, - - /** - * helper function to hide the search marks again - */ - hideSearchWords : function() { - $('#searchbox .highlight-link').fadeOut(300); - $('span.highlighted').removeClass('highlighted'); - }, - - /** - * make the url absolute - */ - makeURL : function(relativeURL) { - return DOCUMENTATION_OPTIONS.URL_ROOT + '/' + relativeURL; - }, - - /** - * get the current relative url - */ - getCurrentURL : function() { - var path = document.location.pathname; - var parts = path.split(/\//); - $.each(DOCUMENTATION_OPTIONS.URL_ROOT.split(/\//), function() { - if (this == '..') - parts.pop(); - }); - var url = parts.join('/'); - return path.substring(url.lastIndexOf('/') + 1, path.length - 1); - } -}; - -// quick alias for translations -_ = Documentation.gettext; - -$(document).ready(function() { - Documentation.init(); -}); diff --git a/docs/pyjalali/_static/down-pressed.png b/docs/pyjalali/_static/down-pressed.png deleted file mode 100644 index 6f7ad78..0000000 Binary files a/docs/pyjalali/_static/down-pressed.png and /dev/null differ diff --git a/docs/pyjalali/_static/down.png b/docs/pyjalali/_static/down.png deleted file mode 100644 index 3003a88..0000000 Binary files a/docs/pyjalali/_static/down.png and /dev/null differ diff --git a/docs/pyjalali/_static/file.png b/docs/pyjalali/_static/file.png deleted file mode 100644 index d18082e..0000000 Binary files a/docs/pyjalali/_static/file.png and /dev/null differ diff --git a/docs/pyjalali/_static/jquery.js b/docs/pyjalali/_static/jquery.js deleted file mode 100644 index 83589da..0000000 --- a/docs/pyjalali/_static/jquery.js +++ /dev/null @@ -1,2 +0,0 @@ -/*! jQuery v1.8.3 jquery.com | jquery.org/license */ -(function(e,t){function _(e){var t=M[e]={};return v.each(e.split(y),function(e,n){t[n]=!0}),t}function H(e,n,r){if(r===t&&e.nodeType===1){var i="data-"+n.replace(P,"-$1").toLowerCase();r=e.getAttribute(i);if(typeof r=="string"){try{r=r==="true"?!0:r==="false"?!1:r==="null"?null:+r+""===r?+r:D.test(r)?v.parseJSON(r):r}catch(s){}v.data(e,n,r)}else r=t}return r}function B(e){var t;for(t in e){if(t==="data"&&v.isEmptyObject(e[t]))continue;if(t!=="toJSON")return!1}return!0}function et(){return!1}function tt(){return!0}function ut(e){return!e||!e.parentNode||e.parentNode.nodeType===11}function at(e,t){do e=e[t];while(e&&e.nodeType!==1);return e}function ft(e,t,n){t=t||0;if(v.isFunction(t))return v.grep(e,function(e,r){var i=!!t.call(e,r,e);return i===n});if(t.nodeType)return v.grep(e,function(e,r){return e===t===n});if(typeof t=="string"){var r=v.grep(e,function(e){return e.nodeType===1});if(it.test(t))return v.filter(t,r,!n);t=v.filter(t,r)}return v.grep(e,function(e,r){return v.inArray(e,t)>=0===n})}function lt(e){var t=ct.split("|"),n=e.createDocumentFragment();if(n.createElement)while(t.length)n.createElement(t.pop());return n}function Lt(e,t){return e.getElementsByTagName(t)[0]||e.appendChild(e.ownerDocument.createElement(t))}function At(e,t){if(t.nodeType!==1||!v.hasData(e))return;var n,r,i,s=v._data(e),o=v._data(t,s),u=s.events;if(u){delete o.handle,o.events={};for(n in u)for(r=0,i=u[n].length;r").appendTo(i.body),n=t.css("display");t.remove();if(n==="none"||n===""){Pt=i.body.appendChild(Pt||v.extend(i.createElement("iframe"),{frameBorder:0,width:0,height:0}));if(!Ht||!Pt.createElement)Ht=(Pt.contentWindow||Pt.contentDocument).document,Ht.write(""),Ht.close();t=Ht.body.appendChild(Ht.createElement(e)),n=Dt(t,"display"),i.body.removeChild(Pt)}return Wt[e]=n,n}function fn(e,t,n,r){var i;if(v.isArray(t))v.each(t,function(t,i){n||sn.test(e)?r(e,i):fn(e+"["+(typeof i=="object"?t:"")+"]",i,n,r)});else if(!n&&v.type(t)==="object")for(i in t)fn(e+"["+i+"]",t[i],n,r);else r(e,t)}function Cn(e){return function(t,n){typeof t!="string"&&(n=t,t="*");var r,i,s,o=t.toLowerCase().split(y),u=0,a=o.length;if(v.isFunction(n))for(;u)[^>]*$|#([\w\-]*)$)/,E=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,S=/^[\],:{}\s]*$/,x=/(?:^|:|,)(?:\s*\[)+/g,T=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,N=/"[^"\\\r\n]*"|true|false|null|-?(?:\d\d*\.|)\d+(?:[eE][\-+]?\d+|)/g,C=/^-ms-/,k=/-([\da-z])/gi,L=function(e,t){return(t+"").toUpperCase()},A=function(){i.addEventListener?(i.removeEventListener("DOMContentLoaded",A,!1),v.ready()):i.readyState==="complete"&&(i.detachEvent("onreadystatechange",A),v.ready())},O={};v.fn=v.prototype={constructor:v,init:function(e,n,r){var s,o,u,a;if(!e)return this;if(e.nodeType)return this.context=this[0]=e,this.length=1,this;if(typeof e=="string"){e.charAt(0)==="<"&&e.charAt(e.length-1)===">"&&e.length>=3?s=[null,e,null]:s=w.exec(e);if(s&&(s[1]||!n)){if(s[1])return n=n instanceof v?n[0]:n,a=n&&n.nodeType?n.ownerDocument||n:i,e=v.parseHTML(s[1],a,!0),E.test(s[1])&&v.isPlainObject(n)&&this.attr.call(e,n,!0),v.merge(this,e);o=i.getElementById(s[2]);if(o&&o.parentNode){if(o.id!==s[2])return r.find(e);this.length=1,this[0]=o}return this.context=i,this.selector=e,this}return!n||n.jquery?(n||r).find(e):this.constructor(n).find(e)}return v.isFunction(e)?r.ready(e):(e.selector!==t&&(this.selector=e.selector,this.context=e.context),v.makeArray(e,this))},selector:"",jquery:"1.8.3",length:0,size:function(){return this.length},toArray:function(){return l.call(this)},get:function(e){return e==null?this.toArray():e<0?this[this.length+e]:this[e]},pushStack:function(e,t,n){var r=v.merge(this.constructor(),e);return r.prevObject=this,r.context=this.context,t==="find"?r.selector=this.selector+(this.selector?" ":"")+n:t&&(r.selector=this.selector+"."+t+"("+n+")"),r},each:function(e,t){return v.each(this,e,t)},ready:function(e){return v.ready.promise().done(e),this},eq:function(e){return e=+e,e===-1?this.slice(e):this.slice(e,e+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(l.apply(this,arguments),"slice",l.call(arguments).join(","))},map:function(e){return this.pushStack(v.map(this,function(t,n){return e.call(t,n,t)}))},end:function(){return this.prevObject||this.constructor(null)},push:f,sort:[].sort,splice:[].splice},v.fn.init.prototype=v.fn,v.extend=v.fn.extend=function(){var e,n,r,i,s,o,u=arguments[0]||{},a=1,f=arguments.length,l=!1;typeof u=="boolean"&&(l=u,u=arguments[1]||{},a=2),typeof u!="object"&&!v.isFunction(u)&&(u={}),f===a&&(u=this,--a);for(;a| t |
| - | - |
| - |
|
-
|
- - |
| - |
| - | - |
| - |
|
-
|
-
| - |
|
-
|
-
|
-
|
-
|
-
|
-
|
-
| - | - |
| - | - |
|
-
| - |
|
-
This page introduce pyjalali to you. If you want rather head into class and -methods’ documentation see Module Index.
-In jcal source directory navigate to subdirectory sources and run python -setup.py install. You must have libjalali installed before.
-You can use most functionalities of standard datetime module by -pyjalali.datetime:
->>> from pyjalali.datetime import datetime
->>> datetime.now()
-... pyjalali.datetime.datetime(1392, 12, 1, 23, 40, 18, 772116)
->>> datetime.today() - datetime(1367, 11 1)
-... datetime.timedelta(30, 85313, 805141)
-There is also pyjalali.datetime.date:
->>> from pyjalali.datetime import date
->>> date.today().isoformat()
-... '1392-12-01'
->>> from pytz import timezone
->>> now_in_teh = datetime.now(timezone('Asia/Tehran'))
->>> # see current time in another area
->>> in_amsterdam = now_in_teh.astimezone(timezone('Europe/Amsterdam'))
->>> print now_in_teh.time(), in_amsterdam.time()
-... 10:42:03.233978 08:12:03.233978
->>> in_amsterdam == now_in_teh
-... True
-To convert between Hijri Shamsi and Gregorian calendars, you can use functions -jalali_from_gregorian() and -gregorian_from_jalali() (or respectively -g2j() and j2g() for short). Also you can use -datetime.datetime.gregorian to get equal datetime in Gregorian -calendar. This will be cached for future uses:
->>> from datetime import datetime as _std_datetime, date as _std_date
->>> from pyjalali.datetime import jalali_from_gregorian, gregorian_from_jalali, datetime, date
->>> jd = datetime(1389, 21, 11, 12, 23, 10)
->>> gd = jd.gregorian
->>> print gd, jd
-... 2011-01-30 18:23:10 1389-11-10 18:23:10
->>> gregorian_from_jalali(jd) == gd
-... True
->>> jalali_from_gregorian(_std_date.today())
-... pyjalali.datetime.date(1392, 12, 2)
-Note unlike many Hijri Shamsi implementations, libjalali doesn’t work by -converting dates to Gregorian and forwarding operations to Gregorian date. -It’s a Hijri Shamsi calendar implementation from base. The only place -pyjalali converts Hijri Shamsi date to Gregorian internally, is to work with -pytz package in timezone aware datetimes. So keep in mind libjalali -doesn’t offer a general converter for dates before UNIX Epoch and pyjalali -converters will fail for them.
-If you need to invoke libjalali library functions directly, you can use wrapper -functions. jtime contains libjalali time functions. Functions used -internally by libjalali resides in jalali. jstr contains -functions for converting between dates and string representation. Core -libjalali data structures are simulated in types.
->>> from pyjalali.jtime import jlocaltime
->>> print jlocaltime(int(time()))
-... 1392/11/2 11-29-11 +12600 (IRST)
-Note
->>> from pyjalali.datetime import utcnow
->>> utcnow()
-... pyjalali.datetime.datetime(1392, 12, 1, 20, 18, 27, 651499)
-pyjalali is a very thin wrapper around libjalali. Package’s version you see -in pyjalali.__init__.__version__ cosists of 3 numbers describing -version of libjalali which pyjalali supposed to work with it and another -number that is revision of pyjalali itself. So 0.6.11.92 would expected -to work with libjalali version 0.6.11.
-| - p | ||
| - | - pyjalali | - |
| - | - pyjalali.__init__ | - |
| - | - pyjalali.datetime | - |
| - | - pyjalali.jalali | - |
| - | - pyjalali.jstr | - |
| - | - pyjalali.jtime | - |
| - | - pyjalali.types | - |
Python bindings for libjalali.
-Low level API could be accessed through jstr, jtime and -jalali modules. Core libjalali data structures resides in -types module.
-An implementation of standard python:datetime.date and -python:datetime.datetime provided in module datetime -using libjalali tools.
-High level API for libjalali.
-Note
-Return a string representing the date, date(1392, 8, 2).ctime() == -'Thu Aba 02 00:00:00 1392'
-Return the local date corresponding to the POSIX timestamp
-Return a string representing the date in ISO 8601 format, -YYYY-MM-DD. For example date(1392, 8, 2).isoformat() == -1392-08-02'
-Return the day of the week as an integer, where Shanbeh is 1
-Broken-down jalali time structure for this date
-Return new date object where values for supplied keyword keywrod -arguments reset: date(1392, 2, 8).replace(month=9) == date(1392, 9, -8)`
-Return a string representing the date, controlled by an explicit -format string. Format codes referring to hours, minutes or seconds -will see 0 values.
-Warning
-libjalali’s jstrftime() defines custom formatting directives -which might defined in your platform too but for other intentions. -Check list of libjalali’s formatting directives.
-Return a time.struct_time from this date. DST flag is --1
-Return current local date
-Return the day of the week as an integer, where Shanbeh is 0
-Return a datetime object with new tzinfo attribute -tz, adjusting the date and time data so the result is the same UTC -time as self, but in tz‘s local time.
->>> from pytz import timezone
->>> d1 = datetime.now(timezone('Asia/Tehran'))
->>> d2 = d1.astimezone(timezone('Asia/Dubai'))
->>> d1 == d2, d1 - d2
-(True, datetime.timedelta(0))
-Make datetime from supplied date and time.
-| Parameters: |
|
-
|---|
Return a string representing the date and time.
->>> datetime(1392, 9, 1, 12, 32, 14, 992).ctime()
-'Jom Aza 01 12:32:14 1392'
-If tzinfo is None, returns None, else returns -self.tzinfo.dst(self), and raises an exception if the latter -doesn’t return None, or a timedelta object.
-Return the local date and time corresponding to the POSIX -timestamp, such as is returned by time.time(). If optional -argument tz is None or not specified, the timestamp is converted to -the platform’s local date and time, and the returned datetime object -is naive.
-Return Gregorian python:datetime.datetime object -corresponding to this datetime. Result will cached for future uses.
-Return a string representing the date and time in ISO 8601 format, -YYYY-MM-DDTHH:MM:SS.mmmmmm or, if :attr`:.microsecond is 0, -YYYY-MM-DDTHH:MM:SS. The optional argument sep (default ‘T’) is a -separator, placed between the date and time portions of the result.
->>> datetime(1392, 9, 1, 12, 32, 14, 992).isoformat(' ')
-'1392-09-01 12:32:14.992'
-Return the day of the week as an integer, where Shanbeh is 1
-Broken-down jalali time structure for this date
-Return the current local date and time. If a timezone provided, -date and time will adjusted to that timezone.
-Return a datetime with the same attributes, except for those -attributes given new values by whichever keyword arguments are -specified.
-Return a string representing the date and time, controlled by an -explicit format string.
-Return a datetime corresponding to date_str, parsed according to -format.
-Return python:datetime.time object with same hour, minute, -second and microsecond. tzinfo is None.
-Return a time.struct_time from this date. The tm_isdst -flag of the result is set according to the dst() method: tzinfo is -None or dst() returns None, tm_isdst is set to -1; else if dst() -returns a non-zero value, tm_isdst is set to 1; else tm_isdst is set -to 0.
-Return python:datetime.time object with same hour, minute, -second, microsecond, and tzinfo attributes.
-If tzinfo is None, returns None, else returns -self.tzinfo.tzname(self), raises an exception if the latter -doesn’t return None or a string object.
-Return the UTC datetime corresponding to the POSIX -timestamp, with tzinfo None.
-Return the current UTC date and time, with tzinfo None. -This is like now(), but returns the current UTC date and time, -as a naive datetime object.
-Timezone offset. If tzinfo is None, returns None, else -returns self.tzinfo.utcoffset(self), and raises an exception if -the latter doesn’t return None, or a datetime.timedelta -object.
->>> from pytz import timezone,AmbiguousTimeError,NonExistentTimeError
->>> timezone('Asia/Tehran').utcoffset(datetime(1390, 1, 1, 10, 2))
-datetime.timedelta(0, 12600)
->>> timezone('Asia/Tehran').utcoffset(datetime(1390, 6, 30, 22, 30))
-datetime.timedelta(0, 16200)
->>> ambiguous = datetime(1392, 6, 30, 23, 30)
->>> try:
-... timezone('Asia/Tehran').utcoffset(ambiguous)
-... except AmbiguousTimeError:
-... print "caught"
-caught
->>> non_existent = datetime(1390, 1, 2, 0, 45)
->>> try:
-... timezone('Asia/Tehran').utcoffset(non_existent)
-... except NonExistentTimeError:
-... print "caught"
-caught
-Return the day of the week as an integer, where Shanbeh is 0.
-Alias for gregorian_from_jalali().
-Alias for jalali_from_gregorian().
-See datetime.now().
-See datetime.utcnow().
-Make Jalali datetime from Gregorian -python:datetime.datetime or make Jalali date from -Gregorian python:datetime.date.
->>> from datetime import datetime as _dtm, date as _dt
->>> jalali_from_gregorian(_dtm(2013, 11, 23, 23, 46, 0, 703498))
-pyjalali.datetime.datetime(1392, 9, 2, 23, 46, 0, 703498)
->>> jalali_from_gregorian(_dtm(2013, 4, 13, 21, 10, 2, 292))
-pyjalali.datetime.datetime(1392, 1, 24, 21, 10, 2, 292)
->>> jalali_from_gregorian(_dtm(2013, 3, 22, 0, 12))
-pyjalali.datetime.datetime(1392, 1, 2, 0, 12, 0, 0)
->>> jalali_from_gregorian(_dt(2013, 3, 21))
-pyjalali.datetime.date(1392, 1, 1)
-Make Gregorian python:datetime.datetime from Jalali -datetime or make Gregorian python:datetime.date from -Jalali date.
->>> gregorian_from_jalali(datetime(1392, 9, 2, 23, 10, 2))
-datetime.datetime(2013, 11, 23, 23, 10, 2)
->>> gregorian_from_jalali(datetime(1392, 6, 30, 22, 30))
-datetime.datetime(2013, 9, 21, 22, 30)
->>> gregorian_from_jalali(date(1392, 6, 30))
-datetime.date(2013, 9, 21)
-Return datetime from provided timestamp ts.
-| Parameters: |
|
-
|---|
libjalali custom functions.
-Alter provided types.struct_jtm object’s fields -tm_mon and tm_mday -based on its tm_yday field. In case of -failure raise ValueError exception if silent is not True.
-Alter provided types.struct_jtm object’s fields -tm_mon and tm_mday -based on its tm_yday field. In case of -failure raise ValueError exception if silent is not True.
-Return number of seconds elapsed since UTC Epoch based on supplied -types.struct_ab_jtm.
-Return types.struct_ab_jtm from given timestamp.
-Calculates Jalali date based on given number of days since UTC -Epoch and return result as types.struct_jtm.
-Return number of days passed since UTC Epoch based on given -types.struct_jtm. In case of failure raise ValueError -exception if silent is not True.
-Fill given types.struct_jyinfo object’s fields with year -information based on given year by types.struct_jyinfo.y.
-Return number of days in provided month of year. -Month number starts at zero
-Return True if given year is leap year else False.
-Updates given types.struct_jtm object’s fields based on its -tm_year, tm_mon and -tm_mday.
-String formatting and deformatting
-Return string representation of given time according to format.
-| Parameters: |
|
-
|---|
Return types.struct_jtm from date_str according to format.
-| Parameters: |
|
-
|---|
Time functions.
-Functions jasctime, jctime, jgmtime and jlocaltime are forwarded -to reentrant backends.
-Return string representation of given time.
-| Parameters: |
|
-
|---|
Return string representation of time from timestamp.
-| Parameters: |
|
-
|---|
Return types.struct_jtm from timestamp expressed in UTC.
-Make types.struct_jtm from timestamp according to local -zone and dst settings.
-Return timestamp from provided time.
-:param pyjalali.types.struct_jtm jtm
-Core C types for libjalali binding.
-Make time.struct_time from broken-down jalali time -structure
-Time passed since UTC Epoch
-Structure/Union member
-Structure/Union member
-Structure/Union member
-Structure/Union member
-Broken-down jalali date and time
-New instance of this object
-Structure/Union member
-Structure/Union member
-Structure/Union member
-Structure/Union member
-Structure/Union member
-Structure/Union member
-Structure/Union member
-Structure/Union member
-Structure/Union member
-Structure/Union member
-Structure/Union member
-Year specific information
-Structure/Union member
-Structure/Union member
-Structure/Union member
-Structure/Union member
-Structure/Union member
-Structure/Union member
-Structure/Union member
-alias of LP_c_int
-- Please activate JavaScript to enable the search - functionality. -
-- From here you can search these documents. Enter your search - words into the box below and click "search". Note that the search - function will automatically search for all of the words. Pages - containing fewer words won't appear in the result list. -
- - -