{ "info": { "author": "Arun Prakash Jana", "author_email": "engineerarun@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Environment :: Console", "Intended Audience :: Developers", "Intended Audience :: End Users/Desktop", "License :: OSI Approved :: GNU General Public License v3 (GPLv3)", "Natural Language :: English", "Operating System :: OS Independent", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3 :: Only", "Topic :: Utilities" ], "description": "

pdd

\n\n

\n\"Latest\n\"AUR\"\n\"PyPI\"\n\"Debian\n\"Fedora\n\"Ubuntu\n

\n\n

\n\"Availability\"\n\"License\"\n\"Build\n

\n\n

\n\"Asciicast\"\n

\n\n`pdd` (Python3 Date Diff) is a small cmdline utility to calculate date and time difference. It can also be used as a timer. If no program arguments are specified it shows the current date, time and timezone.\n\nThere are utilities and shell scripts which do what `pdd` does. However, `pdd` has been written with only one goal - simplicity. Users shouldn't have memorize anything.\n\n*Love smart and efficient utilities? Explore [my repositories](https://github.com/jarun?tab=repositories). Buy me a cup of coffee if they help you.*\n\n

\n\"Donate\n

\n\n### Table of Contents\n\n- [Features](#features)\n- [Installation](#installation)\n - [Dependencies](#dependencies)\n - [From a package manager](#from-a-package-manager)\n - [Release packages](#release-packages)\n - [From source](#from-source)\n - [Running standalone](#running-standalone)\n- [Usage](#usage)\n - [cmdline options](#cmdline-options)\n - [Operational notes](#operational-notes)\n- [Examples](#examples)\n- [Copyright](#copyright)\n\n### Features\n\n- easy to use, minimal dependencies\n- calculate date and time difference\n- calculate diff from *today* and *now*\n- add, subtract duration (timeslice) to/from date (time)\n- countdown timer with command piggybacking\n- custom resolution stopwatch\n- non-verbose mode for background timers\n- show current date, time and timezone\n\n### Installation\n\n#### Dependencies\n\n`pdd` requires Python 3.5 (or later) and the `dateutil` module.\n\nTo install `dateutil` on Ubuntu, run:\n\n $ sudo apt-get install python3-dateutil\n\nor, using pip3:\n\n $ sudo pip3 install python-dateutil\n\n#### From a package manager\n\n- [AUR](https://aur.archlinux.org/packages/pdd/) (`yay -S pdd`)\n- [Debian](https://packages.debian.org/search?keywords=pdd&searchon=names&exact=1) (`apt-get install pdd`)\n- [Fedora](https://apps.fedoraproject.org/packages/pdd) (`dnf install pdd`)\n- [NixOS](https://github.com/NixOS/nixpkgs/tree/master/pkgs/tools/misc/pdd) (`nix-env -i pdd`)\n- [PyPI](https://pypi.org/project/pdd) (`pip3 install pdd`)\n- [Raspbian Testing](https://archive.raspbian.org/raspbian/pool/main/p/pdd/) (`apt-get install pdd`)\n- [Termux](https://termux.com/) (`pip3 install pdd`)\n- [Ubuntu](https://packages.ubuntu.com/search?keywords=pdd&searchon=names&exact=1) (`apt-get install pdd`)\n- [Ubuntu PPA](https://launchpad.net/~twodopeshaggy/+archive/ubuntu/jarun/) (`apt-get install pdd`)\n- [Void Linux](https://github.com/void-linux/void-packages/tree/master/srcpkgs/pdd) (`xbps-install -S pdd`)\n\n#### Release packages\n\nPackages for Arch Linux, CentOS, Debian, Fedora and Ubuntu are available with the [latest stable release](https://github.com/jarun/pdd/releases/latest).\n\n#### From source\n\nIf you have git installed, clone this repository. Otherwise download the latest [latest stable release](https://github.com/jarun/pdd/releases/latest) or [development version](https://github.com/jarun/pdd/archive/master.zip) (*risky*).\n\nInstall to default location (`/usr/local`):\n\n $ sudo make install\n\nTo remove, run:\n\n $ sudo make uninstall\n\n`PREFIX` is supported, in case you want to install to a different location.\n\n#### Running standalone\n\n`pdd` is a standalone utility. From the containing directory, run:\n\n $ chmod +x pdd\n $ ./pdd\n\n### Usage\n\n#### cmdline options\n\n```\nusage: pdd [-h] [-d yyyy mmm dd [yyyy mmm dd | y m d]]\n [-t hh:mm:ss [hh:mm:ss | h:m:s]] [--add] [--sub]\n [--day yyyy mmm dd] [-c hh:mm:ss] [-r command] [-s [resolution]]\n [-q]\n [keywords [keywords ...]]\n\nTiny date, time difference calculator with timers.\n\npositional arguments:\n keywords diff/add/subtract from today or now\n\noptional arguments:\n -h, --help show this help message and exit\n -d yyyy mmm dd [yyyy mmm dd | y m d]\n calculate date difference\n -t hh:mm:ss [hh:mm:ss | h:m:s]\n calculate time difference\n --add add to date (/today) or time (/now)\n --sub subtract from date (/today) or time (/now)\n --day yyyy mmm dd show day of the week on a date\n -c hh:mm:ss start a countdown timer\n -r command run command when countdown timer reaches 0\n -s [resolution] start a stopwatch [default resolution: 3 (ms)]\n -q quiet mode for background timer/stopwatch\n```\n\n#### Operational notes\n\n- ISO 8601 format. Month can be specified as month number (e.g. Jan - 1, Dec - 12).\n- Time is in 24-hr format.\n- The absolute difference is shown. Argument order is ignored.\n- The end date is excluded in date difference calculations.\n- Hour, minute or second can be omitted. Partial inputs are recognized as `mm:ss` or `ss`.\n- The keybind to stop timers is Ctrl-C.\n\n### Examples\n\n1. Calculate diff from **today**:\n\n $ pdd 2014 Jan 15\n\n2. Calculate diff from **now**:\n\n $ pdd 24:00:00\n $ pdd 0\n\n3. Calculate date diff:\n\n $ pdd -d 1983 jul 3 2014 1 15\n\n4. Calculate time diff:\n\n $ pdd -t 45:50 6:17:33\n\n5. Show current date, time and timezone:\n\n $ pdd\n\n6. Specify time with roll-over:\n\n $ pdd -t 5:80:75 6:17:33\n\n7. Add a duration (3 years, 2 months, 1 day) to 28 Feb, 2000:\n\n $ pdd -d 2000 FEB 28 3 2 1 --add\n\n8. Add a timeslice (1 hour 2 mins 3 secs) to 23:45:37:\n\n $ pdd -t 23:45:37 1:2:3 --add\n\n9. Add a duration (3 years, 2 months, 1 day) to **today**:\n\n $ pdd 3 2 1 --add\n\n10. Add a timeslice (1 hour 2 minutes 3 seconds) to **now**:\n\n $ pdd 1:2:3 --add\n\n11. Subtract a duration (1 day) from 1 Mar, 2000:\n\n $ pdd -d 2000 Mar 01 0 0 1 --sub\n\n12. Subtract a timeslice (1 sec) from midnight:\n\n $ pdd -t 00:00:00 0:0:1 --sub\n\n13. Subtract a duration (3 years, 2 months, 1 day) from **today**:\n\n $ pdd 3 2 1 --sub\n\n14. Subtract a timeslice (1 hour 2 minutes 3 seconds) from **now**:\n\n $ pdd 1:2:3 --sub\n\n15. Show the day of the week on 15 Jan 2014:\n\n $ pdd --day 2014 Jan 15\n\n16. Start a countdown timer or stopwatch in **quiet mode** in the background:\n\n $ pdd -qs &\n $ pdd -qc 3:0:0 &\n To see the final counter run `fg` and press Ctrl-C.\n\n17. Run a command when countdown timer reaches 0\n\n $ pdd -c 00:00:5 -r 'ps -aux'\n $ pdd -c 00:00:5 -r 'notify-send pdd \"timer expired\"'\n\n### Copyright\n\nCopyright \u00a9 2017 [Arun Prakash Jana](https://github.com/jarun)\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/jarun/pdd", "keywords": "date time calculator timer", "license": "GPLv3", "maintainer": "", "maintainer_email": "", "name": "pdd", "package_url": "https://pypi.org/project/pdd/", "platform": "any", "project_url": "https://pypi.org/project/pdd/", "project_urls": { "Homepage": "https://github.com/jarun/pdd" }, "release_url": "https://pypi.org/project/pdd/1.4/", "requires_dist": [ "python-dateutil", "twine ; extra == 'packaging'", "pytest ; extra == 'tests'" ], "requires_python": ">=3.5", "summary": "Tiny date, time diff calculator with timers", "version": "1.4" }, "last_serial": 5096823, "releases": { "1.2": [ { "comment_text": "", "digests": { "md5": "fc5d69c17b7ac646a16802b2fe10dd66", "sha256": "30717f9b9c3dadd265d18cff0ea8656610a228349e0e81543373037795fcd086" }, "downloads": -1, "filename": "pdd-1.2-py3-none-any.whl", "has_sig": false, "md5_digest": "fc5d69c17b7ac646a16802b2fe10dd66", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 7922, "upload_time": "2018-06-27T07:56:57", "url": "https://files.pythonhosted.org/packages/01/a6/c19eee3737e4c4ce7e60df75903dd2bcf9e56680aa8901438d433c6b793e/pdd-1.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "d2d02e68fc084f63ebc4bc21e5b659bb", "sha256": "4591305a846a4ba26e7b702d77c6df135a4258c226daa9a01497955cc177913c" }, "downloads": -1, "filename": "pdd-1.2.tar.gz", "has_sig": false, "md5_digest": "d2d02e68fc084f63ebc4bc21e5b659bb", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8172, "upload_time": "2018-06-27T07:56:59", "url": "https://files.pythonhosted.org/packages/b7/17/7bd78295b41909adbc2c9f621cd1c43f35a7bb989e6662e07d5d595adde0/pdd-1.2.tar.gz" } ], "1.3": [ { "comment_text": "", "digests": { "md5": "a34183688e20536ce00c01a3d971429b", "sha256": "bc8c5ede763738d23dc716fab0474276e514bbf5ee4bfc56eac63347e99bf2b2" }, "downloads": -1, "filename": "pdd-1.3-py3-none-any.whl", "has_sig": false, "md5_digest": "a34183688e20536ce00c01a3d971429b", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 7897, "upload_time": "2018-07-02T18:25:34", "url": "https://files.pythonhosted.org/packages/78/07/1e632dd2e284a16052a7f4090b62d033e37eb48bcacd59039c46849bb532/pdd-1.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "9285669979733aaed0f9cc734e423024", "sha256": "464a5afbb51a68b081b53050b6af69361044db7d490e907b870df0494a8ea894" }, "downloads": -1, "filename": "pdd-1.3.tar.gz", "has_sig": false, "md5_digest": "9285669979733aaed0f9cc734e423024", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8157, "upload_time": "2018-07-02T18:25:35", "url": "https://files.pythonhosted.org/packages/6a/c0/940b26bf59cfaf3831a66e1ecc5bf2401a8727c63620cdddd9d0133e8d62/pdd-1.3.tar.gz" } ], "1.3.1": [ { "comment_text": "", "digests": { "md5": "5e13f81b91c964bbc4739497feb29e50", "sha256": "02040f0c6ddd2866e4292e19e84bc59dd655261207fc1a16950009bcdb498b9a" }, "downloads": -1, "filename": "pdd-1.3.1-py3-none-any.whl", "has_sig": false, "md5_digest": "5e13f81b91c964bbc4739497feb29e50", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 7956, "upload_time": "2018-08-08T16:35:31", "url": "https://files.pythonhosted.org/packages/6c/35/d0321f32843f87c245ba660eb443d2a68fc975a5facdd26e331ae2d5d4f7/pdd-1.3.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "f26907b5832f2510795c57d12428cb96", "sha256": "456e1c4b267d3943ec739c5c65d11fcc6321f29b342bb83da1f819323229285c" }, "downloads": -1, "filename": "pdd-1.3.1.tar.gz", "has_sig": false, "md5_digest": "f26907b5832f2510795c57d12428cb96", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 20964, "upload_time": "2018-08-08T16:35:32", "url": "https://files.pythonhosted.org/packages/66/02/da2847b4a5c117b0bd5eacd342e854b15be773730513c844463e450a343c/pdd-1.3.1.tar.gz" } ], "1.4": [ { "comment_text": "", "digests": { "md5": "8ea69b08b3f0ac7ba257e3512fb9bd58", "sha256": "15ecfc0b00b81200418cad6823de9c13061d0f2461fa590c74c40380f5ffa4f7" }, "downloads": -1, "filename": "pdd-1.4-py3-none-any.whl", "has_sig": false, "md5_digest": "8ea69b08b3f0ac7ba257e3512fb9bd58", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.5", "size": 20608, "upload_time": "2019-04-04T12:13:54", "url": "https://files.pythonhosted.org/packages/fd/8c/9f2c975114c4d7808c846c3d88b4f20d9f81199532f1e221d58b758d6c1a/pdd-1.4-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "0b5e84eeaa5fa406db8b6fb010a393ce", "sha256": "bfdd2676875d99f8af6e85eb64dc2b0110ee6a8c90549de7eb08deef5b45791e" }, "downloads": -1, "filename": "pdd-1.4.tar.gz", "has_sig": false, "md5_digest": "0b5e84eeaa5fa406db8b6fb010a393ce", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.5", "size": 22115, "upload_time": "2019-04-04T12:13:55", "url": "https://files.pythonhosted.org/packages/11/65/e888387a2dc1368a6ed2dee142f2cbbbcde81caf2238dc614567edeec104/pdd-1.4.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "8ea69b08b3f0ac7ba257e3512fb9bd58", "sha256": "15ecfc0b00b81200418cad6823de9c13061d0f2461fa590c74c40380f5ffa4f7" }, "downloads": -1, "filename": "pdd-1.4-py3-none-any.whl", "has_sig": false, "md5_digest": "8ea69b08b3f0ac7ba257e3512fb9bd58", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.5", "size": 20608, "upload_time": "2019-04-04T12:13:54", "url": "https://files.pythonhosted.org/packages/fd/8c/9f2c975114c4d7808c846c3d88b4f20d9f81199532f1e221d58b758d6c1a/pdd-1.4-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "0b5e84eeaa5fa406db8b6fb010a393ce", "sha256": "bfdd2676875d99f8af6e85eb64dc2b0110ee6a8c90549de7eb08deef5b45791e" }, "downloads": -1, "filename": "pdd-1.4.tar.gz", "has_sig": false, "md5_digest": "0b5e84eeaa5fa406db8b6fb010a393ce", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.5", "size": 22115, "upload_time": "2019-04-04T12:13:55", "url": "https://files.pythonhosted.org/packages/11/65/e888387a2dc1368a6ed2dee142f2cbbbcde81caf2238dc614567edeec104/pdd-1.4.tar.gz" } ] }