{"id":16606790,"url":"https://github.com/fichtefoll/insertdate","last_synced_at":"2025-10-11T04:15:20.364Z","repository":{"id":3263034,"uuid":"4301872","full_name":"FichteFoll/InsertDate","owner":"FichteFoll","description":"Sublime Text Plugin that provides a configurable command and popup for inserting the current date and time (with specific format)","archived":false,"fork":false,"pushed_at":"2016-11-26T03:31:23.000Z","size":502,"stargazers_count":126,"open_issues_count":10,"forks_count":18,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-04-02T01:11:22.586Z","etag":null,"topics":["hacktoberfest","sublime-text","sublime-text-plugin","text-editing"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/FichteFoll.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-05-11T21:22:22.000Z","updated_at":"2025-02-14T12:06:04.000Z","dependencies_parsed_at":"2022-08-23T14:30:40.747Z","dependency_job_id":null,"html_url":"https://github.com/FichteFoll/InsertDate","commit_stats":null,"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"purl":"pkg:github/FichteFoll/InsertDate","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FichteFoll%2FInsertDate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FichteFoll%2FInsertDate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FichteFoll%2FInsertDate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FichteFoll%2FInsertDate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/FichteFoll","download_url":"https://codeload.github.com/FichteFoll/InsertDate/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FichteFoll%2FInsertDate/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279006248,"owners_count":26084060,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-11T02:00:06.511Z","response_time":55,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["hacktoberfest","sublime-text","sublime-text-plugin","text-editing"],"created_at":"2024-10-12T01:10:02.378Z","updated_at":"2025-10-11T04:15:20.323Z","avatar_url":"https://github.com/FichteFoll.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# InsertDate - Sublime Text Plugin\n\nA plugin for [Sublime Text][st] 2 and 3 that inserts the current date and/or\ntime according to the format specified, supporting named timezones.\n\n![insertdate](https://cloud.githubusercontent.com/assets/931051/9400476/e64b49f8-47c1-11e5-9088-e4f0f0778011.gif)\n\nFor a brief introduction about the accepted formatting syntax, see\n\u003chttp://strfti.me/\u003e. *Might yield different results, see\n[below](#format-examples).*\n\n\n## Installation\n\nYou **must** install this package with [Package Control][pck-ctrl], under\n[`InsertDate`][pck-browse].\n\nUpon installation, you will be asked to select your local timezone. This is\nrequired for pretty formatting of the `%Z` variable and should be set, but\nInsertDate will work without it.\nYou can change this setting at any time with the \"InsertDate: Select Timezone\"\ncommand from the command palette.\n\n\n## Usage\n\nThe quick panel (see gif) opens on \u003ckbd\u003eF5\u003c/kbd\u003e and shows a selection of\npre-defined settings that can be modified. See [Settings](#settings) on how to do that.\n\nHowever, there are many more default key bindings available to provide you with\nthe most-needed formats and a command that allows you to insert your own\nformat and output timezone on the fly.\n\n\n### Command Examples\n\nThe following is an excerpt of the [default key bindings][keymap] (on\n[OSX][keymap-osx]: `super` instead of `ctrl`):\n\n```js\n[\n// Insert datetime using default format text\n  { \"keys\": [\"ctrl+f5\", \"ctrl+f5\"],\n    \"command\": \"insert_date\" },\n\n// Insert datetime using the specified format\n  // Locale date\n  { \"keys\": [\"ctrl+f5\", \"ctrl+d\"],\n    \"command\": \"insert_date\",\n    \"args\": {\"format\": \"%x\"} },\n\n  // Locale time\n  { \"keys\": [\"ctrl+f5\", \"ctrl+t\"],\n    \"command\": \"insert_date\",\n    \"args\": {\"format\": \"%X\"} },\n\n  // Full iso date and time\n  { \"keys\": [\"ctrl+f5\", \"ctrl+i\"],\n    \"command\": \"insert_date\",\n    \"args\": {\"format\": \"iso\"} },\n\n  // Locale date and time converted to UTC (with timezone name)\n  { \"keys\": [\"ctrl+f5\", \"ctrl+u\"],\n    \"command\": \"insert_date\",\n    \"args\": {\"format\": \"%c %Z\", \"tz_out\": \"UTC\"} },\n\n  // Unix time (seconds since the epoch, in UTC)\n  { \"keys\": [\"ctrl+f5\", \"ctrl+x\"],\n    \"command\": \"insert_date\",\n    \"args\": {\"format\": \"unix\"} },\n\n  // ... and many more\n\n// Prompt for user input (\"format\" behaves as default text)\n// and output timezone, if none provided,\n// and then insert the datetime with these parameters\n  { \"keys\": [\"alt+f5\"],\n    \"command\": \"insert_date_prompt\" },\n\n// Show the panel with pre-defined options from settings\n  { \"keys\": [\"f5\"],\n    \"command\": \"insert_date_panel\" }\n]\n\n```\n\n\n### Settings ###\n\nSettings can be accessed using the menu (*Preferences \u003e Package Settings \u003e\nInsertDate \u003e Settings - User/Default*) or the command palette (\"Preferences:\nInsertDate Settings - User/Default\").\n\nYou can also view the default settings [here][settings].\n\n\n### Format Examples\n\nFor the accepted formatting syntax, see \u003chttp://strfti.me/\u003e for an introduction\nand [`datetime.strftime()` behavior][strftime] for all details. Note that the\nintroduction uses a different library and thus *may yield different results*.\n\nHere are some examples on how the values are interpreted:\n\n| Format string              | Parameters                         | Resulting string                     |\n| :------------------------- | :--------------------------------- | :----------------------------------- |\n| `%d/%m/%Y %I:%M %p`        |                                    | 12/08/2014 08:55                     |\n| `%d. %b %y`                |                                    | 12. Aug 14                           |\n| `%H:%M:%S.%f%z`            |                                    | 20:55:00.473603+0200                 |\n| `%Y-%m-%dT%H:%M:%S.%f%z`   |                                    | 2014-08-12T20:55:00.473603+0200      |\n| `iso`                      | `{'tz_out': 'UTC'}`                | 2014-08-12T18:55:00+00:00            |\n| `%c UTC%z`                 | `{'tz_in': 'local'}`               | 12.08.2014 20:55:00 UTC+0200         |\n| `%X %Z`                    | `{'tz_in': 'Europe/Berlin'}`       | 20:55:00 CEST                        |\n| `%d/%m/%Y %I:%M %Z`        | `{'tz_in': 'America/St_Johns'}`    | 12/08/2014 08:55 NDT                 |\n| `%c %Z (UTC%z)`            | `{'tz_out': 'EST'}`                | 12.08.2014 13:55:00 EST (UTC-0500)   |\n| `%x %X %Z (UTC%z)`         | `{'tz_out': 'America/New_York'}`   | 12.08.2014 14:55:00 EDT (UTC-0400)   |\n| `unix`                     |                                    | 1407869700                           |\n\n\n*Notes*:\n\n- `CET` is my actual timezone.\n- `%c`, `%x` and `%X` are representative for *Locale’s appropriate time\n  representation*.\n- `%p` also corresponds to the locale's setting, thus using `%p` e.g. on a\n  German system gives an empty string.\n\n\n### Snippet Macros\n\nYou can use the `insert_date` command in combination with snippets using\nmacros. Here is an example:\n\n```json\n[\n    { \"command\": \"insert_snippet\", \"args\": {\"contents\": \"Date: $1\\nTime: $2\\nSomething else: $0\"} },\n    { \"command\": \"insert_date\", \"args\": {\"format\": \"%x\"} },\n    { \"command\": \"next_field\" },\n    { \"command\": \"insert_date\", \"args\": {\"format\": \"%X\"} },\n    { \"command\": \"next_field\" }\n]\n```\n\nCheck the documentation for [Macros][doc-macros] and [Commands][doc-commands] for further information.\n\n\n### Command Reference\n\n***insert_date_panel***\n\nOpen a quick panel with pre-defined format settings\n\n\n***insert_date***\n\nInsert the current date/time with specified formatting\n\n*Parameters*\n\n- **format** (str) - *Default*: `'%c'` (configurable in settings)\n\n  A format string which is used to display the current time. See\n  \u003chttp://strfti.me/\u003e for an introduction and [`datetime.strftime()`\n  behavior][strftime] for all details.\n\n- **tz_in** (str) - *Default*: `'local'` (configurable in settings and\n  recommended to change)\n\n  Defines in which timezone the current time (read from your system) will be\n  interpreted.\n\n   May\n  be one of [these][timezones] values or `'local'`.\n\n- **tz_out** (str) - *Default*: `None`\n\n  Defines on which timezone the output time should be based.\n\n  By default, uses the same timezone as `tz_in`. May be one of\n  [these][timezones] values or `'local'` (which does not support `%Z`, but\n  `%z`).\n\n\n***insert_date_prompt***\n\nOpen a small panel where you can specify the format string manually. The string\npassed in `format` will be used as default text if available. Accepts the same parameters as ***insert_date***.\n\n\u003c!-- Links --\u003e\n\n[st]: http://sublimetext.com/\n\n[pck-ctrl]: http://wbond.net/sublime_packages/package_control \"Sublime Package Control by wbond\"\n[pck-browse]: https://sublime.wbond.net/packages/InsertDate \"InsertDate - Packages - Package Control\"\n\n[strftime]: http://docs.python.org/3/library/datetime.html#strftime-strptime-behavior \"Python docs: 8.1.8. strftime() and strptime() Behavior\"\n\n[scr-panel]: http://i.imgur.com/hObkE27.png\n[scr-panel-thumb]: http://i.imgur.com/hObkE27l.png\n\n[keymap]: Default.sublime-keymap \"Default.sublime-keymap\"\n[keymap-osx]: Default%20%28OSX%29.sublime-keymap \"Default (OSX).sublime-keymap\"\n[settings]: insert_date.sublime-settings \"insert_date.sublime-settings\"\n\n[doc-macros]: http://docs.sublimetext.info/en/latest/extensibility/macros.html\n[doc-commands]: http://docs.sublimetext.info/en/latest/reference/commands.html\n\n[timezones]: https://github.com/FichteFoll/sublimetext-insertdate/blob/a940b4c4394022725ba933c7db0deb1fb8d21efe/format_date/pytz/__init__.py#L1090-L1520 \"List of common timezones (in source)\"\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffichtefoll%2Finsertdate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffichtefoll%2Finsertdate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffichtefoll%2Finsertdate/lists"}