View Single Post
Old 04-23-2025, 07:56 AM   #834
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 12,476
Karma: 8025702
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by ownedbycats View Post
In another post, I asked about setting specific time. Now I'd like to know if possble to:

1. Take current date.
2. Subtract one day (April 23 -> April 22).
3. Set the time to 23:59 of that date.

This would be for Reading Goal setting the #lastread - I update my daily page at end of day, but sometimes forget till next morning which messes up the page-per-day count.
Code:
program:
	date_arithmetic(re(today(), 'T.*\+', 'T00:00:00+'), '-1m')
This gets the current date and time, sets the time to midnight, then subtracts one minute from that to get 23:59 on the previous day.
chaley is offline   Reply With Quote