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.

Expiration date calculation, jumping summer's months.

Featured Replies

In my babyparking i've 2 cards, one of 30 hours, one of 50 hours.

The 30 hours card expire after 5 month.

The 50 hours card expire after 10 month.

I need to calculate the expiration date jumping the summer's month, july and august.

So if you buy a 50 hours card in may, i must calculate the expiration date adding may, june, september, october, november, december, january, february, march, april (10 month).

I've a creation date field obviously, but i can't figure out how to make a calculation like that.

Over this i must add the year of expiration if i pass december like the example above.

Thankyou!

G.

Try (untested) =

Let ( [

m = Month ( IssueDate ) ; 

diff = Mod ( m - 9 ; 12 ) + Duration ; 

yDiff = Div ( diff ; 10 ) ;

mDiff= Mod ( diff ; 10 ) 

] ;

Date ( 

9 + mDiff ;

Day ( IssueDate ) ;

Year ( IssueDate ) - ( m < 9 ) + yDiff

)

)

where Duration is the number of months (either 5 or 10, in your example).

Note that this assumes no cards are issued in July or in August.

  • Author

A W E S O M E.

I'm not a programmer but i'm fascinated by this logics.

Thank you, you've save us a lot of problem.

:)

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.