Last Day of Month

Last Day of Month

From
Reddit
Status
Updating
Share
Entries
Entries

Last Day of Month

formatDate(dateAdd(prop("Date"), if(month(prop("Date")) == 1, if(year(prop("Date")) / 400 % 1 == 0 or year(prop("Date")) / 4 % 1 == 0 and year(prop("Date")) / 100 % 1 != 0, 29, 28), if(test(month(prop("Date")), "3|5|8|10"), 30, 31)) - date(prop("Date")), "days"), "dddd")

Last Date of Month

dateAdd(prop("Date"), if(month(prop("Date")) == 1, if(year(prop("Date")) / 400 % 1 == 0 or year(prop("Date")) / 4 % 1 == 0 and year(prop("Date")) / 100 % 1 != 0, 29, 28), if(test(month(prop("Date")), "3|5|8|10"), 30, 31)) - date(prop("Date")), "days")
Explanation
if(month(prop("Date")) == 1,
Check to see if Date is in February. If it is, do the following.
if(year(prop("Date")) / 400 % 1 == 0 or year(prop("Date")) / 4 % 1 == 0 and year(prop("Date")) / 100 % 1 != 0, 29, 28),
If the year from Date is evenly divisible by 400, or the year is evenly divisible by 4 and evenly divisible by 100, then it’s a leap year and the total number of days in the month is 29, otherwise it’s 28.
if(test(month(prop("Date")), "3|5|8|10"), 30, 31))
If Date is not in February, test the month number to see if it matches with April, June, September, or November. If it does then the total number of days in

Last Day of Current Month

formatDate(dateAdd(now(), if(month(now()) == 1, if(year(now()) / 400 % 1 == 0 or year(now()) / 4 % 1 == 0 and year(now()) / 100 % 1 != 0, 29, 28), if(test(month(now()), "3|5|8|10"), 30, 31)) - date(now()), "days"), "dddd")

Days in Month

if(month(prop("Date")) == 1, if(year(prop("Date")) / 400 % 1 == 0 or year(prop("Date")) / 4 % 1 == 0 and year(prop("Date")) / 100 % 1 != 0, 29, 28), if(test(month(prop("Date")), "3|5|8|10"), 30, 31))

Month Progress

round(date(prop("Date")) / if(month(prop("Date")) == 1, if(year(prop("Date")) / 400 % 1 == 0 or year(prop("Date")) / 4 % 1 == 0 and year(prop("Date")) / 100 % 1 != 0, 29, 28), if(test(month(prop("Date")), "3|5|8|10"), 30, 31)) * 1000) / 1000

Current Month Progress

round(date(now()) / if(month(now()) == 1, if(year(now()) / 400 % 1 == 0 or year(now()) / 4 % 1 == 0 and year(now()) / 100 % 1 != 0, 29, 28), if(test(month(now()), "3|5|8|10"), 30, 31)) * 1000) / 1000
 
By Ben  •  Latest  •  Was this helpful? Please consider buying me a coffee. Cheers!By Ben  •  Latest  •  Was this helpful? Please consider buying me a coffee. Cheers!
By BenLatest • Was this helpful? Please consider buying me a coffee. Cheers!