Skip to content
View in the app

A better way to browse. Learn more.

The AVSIM Community

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.

Day of the week detection in scasm?

Featured Replies

Hi,I'm trying to create macro which should be visible only at the weekend. So far without success. I'm able to detect number of the day in the year, but not in the week. Is there a way how to achieve this? Thanks.

  • Commercial Member

As far as I know there is no variable for day of the week, so the only one you could use is day of the year I think (although that would mean making a lot of different checks).

Arno

If the world should blow itself up, the last audible voice would be that of an expert saying it can't be done.

FSDeveloper.com | Former Microsoft FS MVP | Blog

That's exactly what I was trying to avoid :) I was thinking about this, but the code would be so complex and probably not feasible in scasm. But I'll probably give it a try before giving up...

Jiri,maybe You could try diving day of year with 7, like:Uvar( $WeekOfYear int( $dayofyear / 7 )Anyway, I am interested though how You get day of Year, it could be useful for me :) Last time I tried to check for it it was unsuccessful :(Best regards,Goran BrumenFS Slovenija 2002 teamhttp://slovenia.avsim.net

HiUntil the world moves over to 8-day weeks, with 3-day weekends of course :-), there is no practical way of doing this. Using SCASM variables is a non-starter - this only works at compile time, not run time.All you could do would be set up a 'lookup table' using Interpolate(). The only other trick I can think of would be to ask the pilot to indicate that it's the weekend by tuning NAV2, say, to a particular frequency.Good luckGerrish

Create an account or sign in to comment

Account

Navigation

Search

Search

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.