Skip to content

Commit

Permalink
Create man/1/calctdiff.md
Browse files Browse the repository at this point in the history
  • Loading branch information
XPhyro committed Sep 5, 2024
1 parent ae301fd commit 335e14e
Showing 1 changed file with 54 additions and 0 deletions.
54 changes: 54 additions & 0 deletions man/1/calctdiff.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
% CALCTDIFF(1) calctdiff VERSION | User Commands Manual
changequote(`{{{', `}}}')%
% syscmd({{{date --date=@"$({ git log -1 --pretty="format:%ct%n" '}}}THIS{{{'; date +"%s"; } | head -n 1)" +"%Y-%m-%d %H:%M:%S"}}})
undefine({{{VERSION}}})
undefine({{{THIS}}})

# NAME

**calctdiff** — calculate time differences

# SYNOPSIS

| **calctdiff** BEGIN_DATE END_DATE

# DESCRIPTION

Calculate the time difference between two dates. The output result is
`(END_DATE - BEGIN_DATE)`. The provided dates may use any syntax parseable by
`date(1)`. If END_DATE is not given, current date is used.

# OPTIONS

No options accepted.

# EXAMPLES

```
$ calctdiff 2020-10-11 2024-09-06
1426 days, 0 hours, 0 minutes, 0 seconds
$ calctdiff 2020-10-11
1426 days, 0 hours, 0 minutes, 0 seconds
$ calctdiff 2020-10-11 "@$(date +%s)"
1426 days, 1 hours, 22 minutes, 1 seconds
```

# AUTHOR

Berke Kocaoğlu <berke.kocaoglu@icloud.com>

# BUGS & ISSUES

Report at <https://github.com/XPhyro/scripts/issues> or
<https://codeberg.org/XPhyro/scripts/issues>, or mail the author.
GitHub is preferred.

# COPYRIGHT

include({{{LICENSE}}})

# SEE ALSO

date(1)

0 comments on commit 335e14e

Please sign in to comment.