Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
oh-my-zsh
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
github
oh-my-zsh
Commits
6779e107
Unverified
Commit
6779e107
authored
Jun 12, 2021
by
Frani
Committed by
GitHub
Jun 12, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(plugins): Add new isodate plugin for friendly date formatting commands (#9963)
* add isodate plugin
parent
9bdbe08a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
0 deletions
+29
-0
README.md
plugins/isodate/README.md
+22
-0
isodate.plugin.zsh
plugins/isodate/isodate.plugin.zsh
+7
-0
No files found.
plugins/isodate/README.md
0 → 100644
View file @
6779e107
# Isodate plugin
**Maintainer:**
[
@Frani
](
https://github.com/frani
)
This plugin adds completion for the
[
ISO 8601
](
https://en.wikipedia.org/wiki/ISO_8601
)
,
as well as some aliases for common Date commands.
To use it, add
`isodate`
to the plugins array in your zshrc file:
```
zsh
plugins
=(
... isodate
)
```
## Aliases
| Alias | Command | Description |
|---------------|--------------------------------------|----------------------------------------------------------------------------|
| isodate |
`date +%Y-%m-%dT%H:%M:%S%z`
| Display the current date with UTC offset and ISO 8601-2 extended format |
| isodate_utc |
`date -u +%Y-%m-%dT%H:%M:%SZ`
| Display the current date in UTC and ISO 8601-2 extended format |
| isodate_basic |
`date -u +%Y%m%dT%H%M%SZ`
| Display the current date in UTC and ISO 8601 basic format |
| unixstamp |
`date +%s`
| Display the current date as a Unix timestamp (seconds since the Unix epoch)|
| date_locale |
`date +"%c"`
| Display the current date using the default locale's format |
plugins/isodate/isodate.plugin.zsh
0 → 100644
View file @
6779e107
# work with date ISO 8601 easy
alias
isodate
=
"date +%Y-%m-%dT%H:%M:%S%z"
alias
isodate_utc
=
"date -u +%Y-%m-%dT%H:%M:%SZ"
alias
isodate_basic
=
"date -u +%Y%m%dT%H%M%SZ"
alias
unixstamp
=
"date +%s"
alias
date_locale
=
"date +"
%c
""
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment