[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: the last saturday in the month
From: |
Marco Atzeri |
Subject: |
Re: the last saturday in the month |
Date: |
Tue, 7 Aug 2018 12:16:39 +0200 |
User-agent: |
Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 |
Am 07.08.2018 um 07:55 schrieb turbofib:
hi,
i would to know if a serial data is the last Saturday in the month
how can i code it?
g=Serial Data
If I correctly understood your question,
using today as reference "Serial Data"
octave:21> a=localtime(time())
a =
scalar structure containing the fields:
usec = 747239
sec = 21
min = 7
hour = 12
mday = 7
mon = 7
year = 118
wday = 2
yday = 218
isdst = 1
gmtoff = 7200
zone = CEST
octave:23> b=eomday(a.year+1900,a.mon+1)
b = 31
The "date" is the last Saturday of the month if
(a.wday == 6) & (a.mon+7>b)
https://octave.org/doc/v4.4.0/Timing-Utilities.html
---
Diese E-Mail wurde von Avast Antivirus-Software auf Viren geprüft.
https://www.avast.com/antivirus