npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

pontomais-calc

v1.0.3

Published

A CLI tool for calculating Pontomais hours

Readme

Pontomais Calculator

The purpose of this tool is to calculate the time from your punches at the punch clock service Pontomais.

Disclaimer

I don't work for Pontomais, I know nothing about them. I just happen to be working for a company that uses this tool and I find it very stupid to be doing the calculations by hand every time I need.

Installation

$ npm i -g pontomais-calc

Usage

Usage: pontomais-calc [options]

Options:
  -u, --username [username]  username or e-mail
  -f, --from-file [path]     corrections file path
  --use-balance              use balance from Pontomais
  --shift [shift]            work hours (default: "8")
  -h, --help                 display help for command

Corrections Example

You can simulate the corrections by referencing a file with these correct punches. For example, let's say that you forgot to punch clock when you came back from lunch yesterday (let's say that it was march 21). You might have gotten into a sticky situation:

08:00, 12:00, 17:00

Well if you happen to have the tedious task of punching clock, this might not be something new to you. And if there's something a punch clock application doesn't like is odd punches. But, fear not!

Simple create a YAML file with this:

- date: 21
  punches: ['08:00', '12:00', '13:00', '17:00']

Then save this file (let's say punchclocksucks.yaml... you can put many corrections you need as long as they're from the current month) and then run the following command:

$ pontomais-calc -u <your-email-from-pontomais> -f punchclocksucks.yaml

It will ask for your password and then... Voilá!

{
  "currentTime": "09:49:29",
  "serverTime": "09:49:29",
  "dayClosureEstimate": {
    "workShiftBased": "17:00",
    "hourBankBased": "17:21"
  },
  "dayBalance": {
    "completed": {
      "asMinutes": 49,
      "asShortTime": "00:49"
    },
    "remaining": {
      "asMinutes": 431,
      "asShortTime": "07:11"
    },
    "extra": {
      "asMinutes": 0,
      "asShortTime": "00:00"
    }
  },
  "weekBalance": {
    "total": {
      "asMinutes": 0,
      "asShortTime": "00:00"
    },
    "completed": {
      "asMinutes": 0,
      "asShortTime": "00:00"
    },
    "remaining": {
      "asMinutes": 0,
      "asShortTime": "00:00"
    }
  },
  "monthBalance": {
    "completed": {
      "asMinutes": 9148,
      "asShortTime": "152:28"
    },
    "extra": {
      "asMinutes": -21,
      "asShortTime": "00:21",
      "isPositive": false
    }
  }
}

You got a bunch of numbers that might be helpful. But keep in mind that this is a simple calculation of the days you worked a total of hours specified in --shift option (defaults to 8). If you want, you can always calculate with the balance that comes from the Pontomais API using the --use-balance flag. This will then take the existent balance into account (might not be very helpful if your punches are a complete mess though).

Variables

An environment variable called SERVICE_ENDPOINT can be used to indicate the endpoint to get the history of Pontomais. For now this is defaulting to an URL that points to a Lambda function that gets the punches of history and put them in a known format so I can trust and process in this script.

Contributing

Feel free to open issues and PRs. But be aware that I made this at the end of a very busy day and it is not the code I would be eternally proud of.