Skip to content

InfiiiinitY/ChronoDiff

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ChronoDiff

ChronoDiff is a command-line tool written in Go that calculates the difference between two timestamps. It is designed to be simple and efficient, providing a quick way to determine the time elapsed between two given times. Without having to visit any websites.

Features

  • Calculate the difference between two timestamps
  • Output the result in a human-readable format
  • Output the result in normal (8h30m) as well as industrial time (8.5h)

Usage

To use ChronoDiff, simply provide two timestamps as input. The tool will output the difference between them.

chronodiff --start "06:25" --end "15:13"

Output:

+---------------+---------+------------+
| #             |  NORMAL | INDUSTRIAL |
+---------------+---------+------------+
| Without break | 8h48m0s |        8.8 |
| With break    |  8h3m0s |       8.05 |
+---------------+---------+------------+

By default, Chronodiff defaults to a break time of 45 minutes. This can be changed by providing a different amount of minutes.

chronodiff --start "6:25" --end "15:13" --break 60

Output:

+---------------+---------+------------+
| #             |  NORMAL | INDUSTRIAL |
+---------------+---------+------------+
| Without break | 8h48m0s |        8.8 |
| With break    | 7h48m0s |        7.8 |
+---------------+---------+------------+

Installation

Without having Go installed

  1. Download the latest binary from the Releases tab

  2. Place the binary wherever you want

With Go installed

  1. Clone the repository:
    git clone https://github.com/InfiiiinitY/ChronoDiff.git
  2. Navigate to the project directory:
    cd chronodiff
  3. Build the project:
    go build chronodiff.go
  4. Place the binary wherever you want

Adding Chronodiff to the Path variable

If you want Chronodiff to be callable from the command line as shown under Usage, place the binary somewhere inside your Path.

If you don't know what I'm talking about, read about the Path environment variable here. This also shows you how to add a folder to the Path variable.

About

A simple tool to calculate time differences.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages