Euphoria Ticket #1012: datetime (explanation is unclear)

  • Declares a variable of type datetime.
  • Type checks an existing variable to determine if it is a valid datetime

Example 1:

include std/datetime.e  
datetime x = now() -- x is a datetime variable, and now() returns a datetime 
? x  
? datetime(x) -- is it a datetime variable?  



Example 2:

include std/datetime.e 
object y = {2019,01,10} -- y is not a datetime variable, just a sequence containing a date 
? y 
? datetime(y) -- is this a datetime variable?  



Example 3:

include std/datetime.e 
datetime z = {2019,01,01} -- z is declared as a datetime type, so it is validated on assignment 
-- what we assigned was not a valid datetime, so we get: 
-- type_check failure, z is {2019,1,1}  


Type: Task Severity: Normal Category: Documentation
Assigned To: euphoric Status: Fixed Reported Release:
Fixed in SVN #: View VCS: none Milestone: 4.1.0


Quick Links

User menu

Not signed in.

Misc Menu