logo
Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
vikas  
#1 Posted : Friday, July 27, 2018 3:57:58 AM(UTC)
vikas

Rank: Member

Groups: Registered Users, Subscribers
Joined: 2/7/2015(UTC)
Posts: 15

Thanks: 9 times

As the heading suggests, how do I identify the last Thursday of every month?

F & Os expire on last Thursdays in India.

So is there any way to do the job without DLLs. I do have 'Forum.dll'.

Thanks in advance

vikas  
#2 Posted : Saturday, July 28, 2018 4:56:31 AM(UTC)
vikas

Rank: Member

Groups: Registered Users, Subscribers
Joined: 2/7/2015(UTC)
Posts: 15

Thanks: 9 times
^^ Also, can Optionexp() be modified for last Thursdays of every month.
vikas  
#3 Posted : Tuesday, September 4, 2018 12:54:13 PM(UTC)
vikas

Rank: Member

Groups: Registered Users, Subscribers
Joined: 2/7/2015(UTC)
Posts: 15

Thanks: 9 times
Originally Posted by: vikas Go to Quoted Post

As the heading suggests, how do I identify the last Thursday of every month?

F & Os expire on last Thursdays in India.

So is there any way to do the job without DLLs. I do have 'Forum.dll'.

Thanks in advance

Forgot about this.

Here's what I got:

th:=DayOfWeek()=4;

m:=Month(); dm:=DayOfMonth();

thd:=If(th,dm,0);

thd AND If(m=1,dm>24, If(m=2,dm>21, If(m=3,dm>24, If(m=4,dm>23, If(m=5,dm>24, If(m=6,dm>23, If(m=7,dm>24, If(m=8,dm>24, If(m=9,dm>23, If(m=10,dm>24, If(m=11,dm>23,dm>24)))))))))));

There has to be a much better way of writing this. ;)

Users browsing this topic
Guest (Hidden)
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.