When working with SDateTime you often need a now() method to get the current date & time. To get this you currently have to do this:
Local now:SDateTime
CurrentDateTime( now )
Please could you consider adding the "now" functionality into SDateTime either as a default constructor or as a method like this:
Rem
bbdoc: Create an object representing the current date and time
returns: The current date and time
End Rem
Method Now:SDateTime( utc:Int = True )
CurrentDateTime( self, utc )
Return self
End Method
We can then create a variable simply by doing this:
Local now:SDateTime = new SDateTime.now()
Having this as a function would also be useful and would sit alongside the existing CurrentDateTime() :
Rem
bbdoc: Create an object representing the current date and time
returns: The current date and time
End Rem
Function CurrentDateTime:SDateTime( utc:Int = True )
Local dt:SDateTime
CurrentDateTime( dt, utc )
Return dt
End Function
RE: pub.stdc / Struct SDateTime
When working with SDateTime you often need a now() method to get the current date & time. To get this you currently have to do this:
Please could you consider adding the "now" functionality into SDateTime either as a default constructor or as a method like this:
We can then create a variable simply by doing this:
Having this as a function would also be useful and would sit alongside the existing CurrentDateTime() :
We can then use it in this way:
Thanks in advance... Si...