node package manager
Don’t reinvent the wheel. Reuse code within your team. Create a free org »

weektime

weektime

returns the number of seconds elapsed since the beginning of the week (sunday)

weektime(unixtime)

- example `weektime(1438559291)`, returns 71291
- for a given unixtime int, returns how many seconds elapsed since the beginning of that week

I've been working with lots of time series data recently and rewriting something like weektime regularly to visualize trends in weekly activity. Figured I should just package it up for real.