[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: the last saturday in the month
From: |
gciriani |
Subject: |
Re: the last saturday in the month |
Date: |
Tue, 7 Aug 2018 09:33:42 -0500 (CDT) |
Turbofib,
There is no need to use datestr, because you admitted you already have the
date number, in your example you gave 733546.
So if you use d = 733546 then Marco Atzeri's solution is the correct one
which using d as your date variable, in a compact way would become
d = 733546;
a = localtime(d);
b = eomday(a.year+1900,a.mon+1);
Last_Saturday = (a.wday == 6) & (a.mon+7>b)
-----
Giovanni Ciriani - Windows 10, Octave 4.2.1, configured for x86_64-w64-mingw32
--
Sent from: http://octave.1599824.n4.nabble.com/Octave-General-f1599825.html
- the last saturday in the month, turbofib, 2018/08/07
- Re: the last saturday in the month, Marco Atzeri, 2018/08/07
- Re: the last saturday in the month,
gciriani <=
- Re: the last saturday in the month, turbofib, 2018/08/07
- Re: the last saturday in the month, Marco Atzeri, 2018/08/07
- Re: the last saturday in the month, turbofib, 2018/08/07
- Re: the last saturday in the month, gciriani, 2018/08/07
- Re: the last saturday in the month, turbofib, 2018/08/07
- Re: the last saturday in the month, gciriani, 2018/08/07