
Quote from Talker on June 14, 2022, 1:55 amI stumbled on a very interesting (probably older) Scripted Logic web page:
http://www.scriptedlogic.com/zzold/neoHOW7.htm
It is checking a date entered in [TextEntry1].
However, is it possible to compare the current date with an expiration date set by the user on app boot up? So that the app auto-closes when it is launched after that specific date?
This could be used to create rudimentary demo protection of a Neo app (assuming the user does not want to go through the hassle of changing the system clock).
I am picturing the following Pseudo Action Code in Page Properties:
If "[TodaysDate]" ">=" ""
AlertBox "Expired!" "Your grace period has expired."
Delay "4000"
Exit "" ""
Else
GotoPage "Main"
EndIfIf anyone has a sample app for this with working code that would be appreciated!
Another option would be for the app to store today's date in a variable and then (silently) set a (calendar) date to self-destruct after 30 days?
I stumbled on a very interesting (probably older) Scripted Logic web page:
http://www.scriptedlogic.com/zzold/neoHOW7.htm
It is checking a date entered in [TextEntry1].
However, is it possible to compare the current date with an expiration date set by the user on app boot up? So that the app auto-closes when it is launched after that specific date?
This could be used to create rudimentary demo protection of a Neo app (assuming the user does not want to go through the hassle of changing the system clock).
I am picturing the following Pseudo Action Code in Page Properties:
If "[TodaysDate]" ">=" ""
AlertBox "Expired!" "Your grace period has expired."
Delay "4000"
Exit "" ""
Else
GotoPage "Main"
EndIf
If anyone has a sample app for this with working code that would be appreciated!
Another option would be for the app to store today's date in a variable and then (silently) set a (calendar) date to self-destruct after 30 days?
Quote from Gaev on June 14, 2022, 3:35 am@talker:
The site you referred to belongs to me.
is it possible to compare the current date with an expiration date set by the user
You do not need that code to compare two dates ... the easiest way is to perform a DateToNum on both dates (https://winhelp.visualneo.com/Control.html#DATETONUM )
DateToNum "date" "format" "variable"... then compare the two resulting numbers ... take appropriate action depending on the result being negative/positive.
The referenced Help page includes an example that calculates the number of days since December 15th, 2004 ... you should be able to modify the code to meet your requirements ... let us know if you run into problems.
@talker:
The site you referred to belongs to me.
is it possible to compare the current date with an expiration date set by the user
You do not need that code to compare two dates ... the easiest way is to perform a DateToNum on both dates (https://winhelp.visualneo.com/Control.html#DATETONUM )
DateToNum "date" "format" "variable"
... then compare the two resulting numbers ... take appropriate action depending on the result being negative/positive.
The referenced Help page includes an example that calculates the number of days since December 15th, 2004 ... you should be able to modify the code to meet your requirements ... let us know if you run into problems.

Quote from Talker on June 14, 2022, 4:41 amThank you Gaev. Appreciate your reply.
I slightly modified this section from the Help file:
DateToNum "6/12/2022" "m/d/y" "[StartDate]"
DateToNum "[DateShort]" "Default" "[Today]"
Math "[Today]-[StartDate]" "0" "[Result]"
AlertBox "Answer" "It has been [Result] days since 6/12/2022"In that case, it says:
It has been two days since 6/12/2022But it's not clear to me how to compare/specify whether the difference between [StartDate] and [Today] is less then, let's say 30 days...
Thank you Gaev. Appreciate your reply.
I slightly modified this section from the Help file:
DateToNum "6/12/2022" "m/d/y" "[StartDate]"
DateToNum "[DateShort]" "Default" "[Today]"
Math "[Today]-[StartDate]" "0" "[Result]"
AlertBox "Answer" "It has been [Result] days since 6/12/2022"
In that case, it says:
It has been two days since 6/12/2022
But it's not clear to me how to compare/specify whether the difference between [StartDate] and [Today] is less then, let's say 30 days...
Quote from Gaev on June 14, 2022, 10:59 pm@talker
But it's not clear to me how to compare/specify whether the difference between [StartDate] and [Today] is less then, let's say 30 days...
How about ...
DateToNum "6/12/2022" "m/d/y" "[StartDate]" DateToNum "[DateShort]" "Default" "[Today]" Math "[Today]-[StartDate]" "0" "[Result]" ...AlertBox "Answer" "It has been [Result] days since 6/12/2022" If "[Result]" ">=" "30" AlertBox "Expired!" "Your grace period has expired." Delay "4000" Exit "" "" Else GotoPage "Main" EndIf
But it's not clear to me how to compare/specify whether the difference between [StartDate] and [Today] is less then, let's say 30 days...
How about ...
DateToNum "6/12/2022" "m/d/y" "[StartDate]" DateToNum "[DateShort]" "Default" "[Today]" Math "[Today]-[StartDate]" "0" "[Result]" ...AlertBox "Answer" "It has been [Result] days since 6/12/2022" If "[Result]" ">=" "30" AlertBox "Expired!" "Your grace period has expired." Delay "4000" Exit "" "" Else GotoPage "Main" EndIf


Quote from DaviddeArgentina on July 12, 2022, 7:23 pmHi @talker,
This topic is considerated on another post.
keep in mind that it is very easy to alter the system date, so it is possible to pervert actions related to the integrity of dates and programs.
I am seeing that the most convenient is the execution of the web:
https://tf.nist.gov/tf-cgi/servers.cgi
which would be the most reliable way to verify the integrity of the real date and time and that of the system
Added the function at NeoDates Plugin:
ae_Dates_GetNISTDate
Purpose: Get the System Date/Time based on the
NIST Internet Time Service
Returns a lot of info about Date / Location / Julian Date / Delays and another info.
You could check about at:
https://www.nist.gov/pml/time-and-frequency-division/time-distribution/internet-time-service-its
Now you can be sure of the date and time on your computer forever.
NeoDates is in this link:
https://aplicaciones.xp3.biz/neobook/misc.html
Hi @talker,
This topic is considerated on another post.
keep in mind that it is very easy to alter the system date, so it is possible to pervert actions related to the integrity of dates and programs.
I am seeing that the most convenient is the execution of the web:
https://tf.nist.gov/tf-cgi/servers.cgi
which would be the most reliable way to verify the integrity of the real date and time and that of the system
Added the function at NeoDates Plugin:
ae_Dates_GetNISTDate
Purpose: Get the System Date/Time based on the
NIST Internet Time Service
Returns a lot of info about Date / Location / Julian Date / Delays and another info.
You could check about at:
https://www.nist.gov/pml/time-and-frequency-division/time-distribution/internet-time-service-its
Now you can be sure of the date and time on your computer forever.
NeoDates is in this link:

Quote from Talker on July 13, 2022, 1:03 amThanks David. That sounds really usable.
Do you have any downloadable demo versions of your plug-ins?
I don't see a link anywhere...
Thanks David. That sounds really usable.
Do you have any downloadable demo versions of your plug-ins?
I don't see a link anywhere...

Quote from DaviddeArgentina on July 13, 2022, 7:29 pm@talker,
Send me an email at
aplicaciones (at) rocketmail (dot) com
and i will send you the generic sample plugin
Greetings from Buenos Aires
David de Argentina
Send me an email at
aplicaciones (at) rocketmail (dot) com
and i will send you the generic sample plugin
Greetings from Buenos Aires
David de Argentina


Quote from DaviddeArgentina on July 14, 2022, 4:29 pm@talker,
Sent yesterday.
Check you spam folder
Sent yesterday.
Check you spam folder


Quote from DaviddeArgentina on July 14, 2022, 5:29 pmI just resent this.
Try to download at:
https://aplicaciones.xp3.biz/neobook/NeoDates_Generic.zip
Greetings from Buenos Aires,
David de Argentina
I just resent this.
Try to download at:
https://aplicaciones.xp3.biz/neobook/NeoDates_Generic.zip
Greetings from Buenos Aires,
David de Argentina

Quote from DaviddeArgentina on July 14, 2022, 7:25 pm@talker,
Reread the zip I sent you in the previous post.
It appears as a false positive.
After I remove the check mark from compress using UPX, everything seems to work fine.
Reread the zip I sent you in the previous post.
It appears as a false positive.
After I remove the check mark from compress using UPX, everything seems to work fine.
