swirl
Guide to OmniMark 8   OmniMark home
docs home 
IndexConceptsTasksSyntaxLibrariesLegacy LibrariesErrors
 
      Other Library Functions  
function  

ymd-weekday

 
 

Library: Date and time functions (OMDATE)
Include: omdate.xin
Return type: Integer

Returns: Returns the number of the day of the week.


Declaration

define integer function ymd-weekday of value string ymd

Argument definitions

ymd
is the date in "YYYYMMDD" format


Purpose

This function takes a date in "YYYYMMDD" format and returns the appropriate day of the week's number for that date, with Monday being day 1 and Sunday being day 7.

Argument:

Example:


  include "omdate.xin"
  process
      output "Today now-as-ymdhms = " 
         || now-as-ymdhms
         || "%n"
         || "Today is a day number " 
         || "d" % ymd-weekday of now-as-ymdhms 
         || "%n"
  ; Result of this program when run on a Thursday:
  ;   Today now-as-ymdhms = 20010215174159-0500
  ;   Today is a day number 4

        Other Library Functions
   add-to-ymdhms
   arpadate-to-ymdhms
   format-ymdhms
   now-as-ymdhms
   round-down-ymdhms
   round-up-ymdhms
   ymdhms-adjust-time-zone
   ymdhms-day-difference
   ymdhms-julian-day-count
   ymdhms-month-difference
   ymdhms-second-difference
   ymdhms-to-arpadate
   ymd-weekday
 
 

Top [ INDEX ] [ CONCEPTS ] [ TASKS ] [ SYNTAX ] [ LIBRARIES ] [ LEGACY LIBRARIES ] [ ERRORS ]

OmniMark 8.2.0 Documentation Generated: March 13, 2008 at 3:27:39 pm
If you have any comments about this section of the documentation, please use this form.

Copyright © Stilo International plc, 1988-2008.