Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Every second an third monday in odd numbered month

Featured Replies

I'm strugging to grasp how to make two loops in recursive custom functions ...can anyone??? The result must be a return/pilcrow delimited list of dates within a span from day1 until day2....

--sd

In general, you could either use a secondary function or piggy back a parameter as shown

 

But in the example given, one could simply:

- move 2 months forward;

- if 2nd Monday is in range - 2nd Monday & � &

- if 3rd Monday is in range - 3rd Monday & �

  • Author

Alright then - to the problem to make the prefix work, how would you make a calc that goes true 2nd monday en each month ...Choose(DayOfWeek(Date( ....seems a little clunkcy and not particular flexible???

--sd

I don't understand the question: What is 'the prefix'? And what is 'true 2nd monday'?

BTW, note that the iCal does NOT provide this option.

  • Author

I use the custom function MatchPrefixAll( to sift out the dates made in another custom function where if a date matches a certain criteria it gets prefixed. This means that it all falls on me being able to write these conditions into a function that is flexible enough to do more that if DayOfWeek is equal to 1 then prefix the date - such as the header of this thread.

--sd

I am lost.

I think you have made it clear what the desired output should be.

What is the input? Specifically, what is the user input and what can be hard-coded?

In iCal, if you choose 'every n-th month', you can then specify 'every m-th k DayOfWeek'. It will not let you have more than one instance of any one variable.

Do you want the user to be able to specify more than one m? Or is the 'second and third' a fixed thing?

  • Author

The user inputs a startdate and an untildate, and wishes to have all the 2nd mondays in odd numbered month if posible.

The userinterface is very close to the one in palmOS except it's not the first date that pulls but a day in the first week.

--sd

Doesn't really answer my questions (I don't have Palm), but see if the attached gets you anywhere.

twiceInBlueMoon.fp7.zip

  • Author

I think it does ...but I need to investigate it. Thanks!!!

--sd

  • Author

Right, this one does what I wish for, or rather I could restrain the demands to this:

Let ( [

start = Extend ( StartDate ) ;

end = Extend ( EndDate ) ;

interval = Extend ( MonthInterval ) ;

k = Extend ( Every ) ;

wDay = Extend ( WeekDay ) ;

i = Get ( CalculationRepetitionNumber ) - 1 ;

day1 = Date ( Month ( start ) + interval * i ; 1 ; Year ( start ) ) ;

diff = wDay - DayOfWeek ( day1 ) ;

add = Mod ( diff ; 7 ) + 7 * ( k - 1 ) ;

reccurence = day1 + add

] ;

Case ( start <= reccurence and reccurence <= end ; reccurence )

)

But since I use custom functions for other ways of recurrences, would it be great to have it as CF giving a pilcrow-delimited list of usefull dates - otherwise would I need to convert the other plicrow delimited lists created into a repeating calc'field ...which of course is a posibility, and a good question why I refreain from it??

So if you right of the bat can turn it a CF ...might it contribute pretty well to my doubts smile.gif

--sd

  • Author

Indeed! ...it's really straight forward, it requires a new way of thinking for me - that I ought to have picked up some time ago ...but really havn't!!!

Thanks a lot!

--sd

I think comment hovers six inches off the floor. He probably thought that up while he was making himself a sandwich. You-Rock.gif

Let's not get carried away, shall we?

First, it's really quite trivial to convert a recursive repeating field calc to a custom function.

Second, it's not THAT complex a calc. (Incidentally, I could point you to some of my posts that *I* thought were the cat's pajamas - but no one else seemed to care.)

Finally, I do NOT hover six inches off the floor. The best I have managed so far is 5 1/2.

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.