mirror of
https://github.com/Swarsel/.dotfiles.git
synced 2025-12-06 09:07:21 +01:00
feat: add time conversion scripts
This commit is contained in:
parent
02adc13792
commit
86de91c6e3
5 changed files with 66 additions and 0 deletions
|
|
@ -17,6 +17,8 @@ let
|
|||
"github-notifications"
|
||||
"screenshare"
|
||||
"bootstrap"
|
||||
"t2ts"
|
||||
"ts2t"
|
||||
];
|
||||
mkPackages = names: builtins.listToAttrs (map
|
||||
(name: {
|
||||
|
|
|
|||
9
pkgs/t2ts/default.nix
Normal file
9
pkgs/t2ts/default.nix
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
{ writeShellApplication }:
|
||||
|
||||
writeShellApplication {
|
||||
name = "t2ts";
|
||||
runtimeInputs = [ ];
|
||||
text = ''
|
||||
date -d"$1" +%s
|
||||
'';
|
||||
}
|
||||
9
pkgs/ts2t/default.nix
Normal file
9
pkgs/ts2t/default.nix
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
{ writeShellApplication }:
|
||||
|
||||
writeShellApplication {
|
||||
name = "ts2t";
|
||||
runtimeInputs = [ ];
|
||||
text = ''
|
||||
date -d @"$1" 2>/dev/null || date -r "$1"
|
||||
'';
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue