diff options
Diffstat (limited to 'distamp.ha')
| -rw-r--r-- | distamp.ha | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -9,12 +9,17 @@ use getopt; type parseerror = !strconv::error; +def MAJOR = 2; +def MINOR = 0; +def PATCH = 0; + export fn main() void = { const cmd = getopt::parse(os::args, "discord relative timestamp generator", ('a', "date", "Absolute date (this option is exclusive, any other options will be ignored)"), ('d', "days", "Number of days"), ('w', "weeks", "Number of weeks"), + ('v', "Print version"), "m[:s]", ); defer getopt::finish(&cmd); @@ -57,6 +62,9 @@ export fn main() void = { case let e: parseerror => fmt::fatal(strerror(e)); }; + case 'v' => + fmt::printfln("{}.{}.{}-{}_{}", MAJOR, MINOR, PATCH, os::sysname(), os::arch_name(os::architecture()))!; + return; case => abort(); }; }; |
