I am trying to calculate the current second in the current month, but I’m having trouble creating a simple function that does it.
My best guess involves using getTime() – the current milliseconds since January 1 1970 – and then subtracting X, where X is the number of milliseconds up to the end of the previous month.
Can you help me think of a better way to do this?
Thank you very much for your help.
Cheers,
1 Answer