declare detecting Mojave

Hello,
in an app of mine I have to detect if users’ Macs are running Mojave or pre-mojave (10.10 - 10.13) OS system.
At present I’m using a carbon declare, but I’d rather like using a cocoa declare, if possible.

Could anybody kindly post such declare or any other non-carbon way to detect it?
Thank you.

https://ohanaware.com/xojo/

scroll down and download the OS X information demo project.

Thank you, Sam. Appreciated.