Contact | Privacy | Datenschutzerklärung | Impressum

strptime

Format: strptime( string, format, time )

Purpose: Parse a string-formatted time value. The string and format parameter must denote a string. The time parameter must be a value to which an object containing the broken down time can be assigned. The structure of a broken down time object is described in localtime().

Return Values: Returns null if string cannot be parsed using format. Otherwise, it returns the position after the last character within string that has been parsed.

The format string consists of zero or more conversion specifications and ordinary characters. A conversion specification consists of a '%' (percent) character followed by a character that determines the specification's behavior. Ordinary characters are copied unchanged into the result string. Each conversion specification is replaced by appropriate characters as described in the following list.

conversionreplacement
%%percent character
%aabbreviated weekday name
%Afull weekday name
%babbreviated month name
%Bfull month name
%cdefault date and time representation (same as %x %X)
%dday of month, two digits 01-31
%Hhour, two digits 00-23
%Ihour, two digits 01-12
%jday of the year, three digits 001-366
%mmonth number, two digits 01,12
%Mminute, two digits 00-59
%pa.m. or p.m. designation of the 12-hour clock
%rtime as %I:%M:%S %p
%Rtime as %H:%M
%Ssecond, two digits 00-61.
%Ttime as %H:%M:%S
%wweekday number, 0-6, Sunday is 0
%xdefault date representation
%Xdefault time representation
%yyear within century, two digits 00-99
%Yyear with century

Note: In principle, this function does not initialize the time parameter but only stores the values specified. But since we don't know beforehand whether daylight saving time (DST) is in effect or not, the time object's isdst field is set to -1 for heitml versions > 2.05.

Example:

input:resulting output:
<? strptime ("Tuesday Feb 29 2000", "%A %b %d %Y", tm) "NN"; ? tm>19(sec=0, min=0, hour=0, mday=29, mon=1, year=2000, wday=2, yday=59, isdst=-1)
<? strptime ("02/29/2000", "%m/%d/%Y", tm) "NN"; ? tm>10(sec=0, min=0, hour=0, mday=29, mon=1, year=2000, wday=2, yday=59, isdst=-1)
<? strptime ("13/33/2002", "%m/%d/%Y", tm) "NN"; ? tm>NULL(sec=0, min=0, hour=0, mday=0, mon=0, year=1900, wday=0, yday=0, isdst=-1)

Note: Internationalization support is planned for the next major revision of heitml.

See Also: caltime(), difftime(), gmtime(), localtime() mktime(), strftime().


This page was dynamically generated by the web application development tool RADpage of H.E.I.

Selected blog articles : 3D Objects on HTML pages, CSS Transition Visibility, and CSS Transition Display.


© 1996-2024 H.E.I. All Rights Reserved.



Homepage
Intro/Features
Component Guide
Programming
  Language Guide
  Language Ref.
    General Design
    Lexical Structure
    Expressions
    Objects
    Methods
    Classes
    heitml Tags
    heitml Functions
      ArAppend
      ArConcat
      ArSearch
      array
      asc
      caltime
      chr
      class
      clone
      contains
      ContainsCase
      copy
      copyfile
      crypt
      _dbcolumns
      _dbforeignkey
      _dbprimarykey
      _dbtables
      _dbtypes
      default
      deletefile
      difftime
      directory
      findex
      flush
      fname
      gmtime
      htmlbool
      http_content_type
      http_empty_document
      http_expires
      http_header
      http_last_modified
      http_location
      http_set_cookie
      http_request_header
      _includefilepreprocessed
      index
      IndexCase
      integer
      isbool
      isdecl
      isempty
      isinteger
      isnull
      isstring
      istuple
      isreal
      left
      len
      localtime
      MD5
      mkdir
      mktime
      movefile
      offstotabcol
      random
      readFileLines
      _readini
      _readodbcdrv
      _readodbcdsn
      real
      resize
      right
      _serverdocroot
      _shelltemp
      srandom
      splitstring
      stat
      strftime
      strptime
      subst
      substall
      substring
      tabcoltooffs
      tolower
      toupper
      trim
      trimleft
      trimright
      TuAppField
      TuAssField
      TuAssign
      TuSlice
      TuDelField
      TuFieldSort
      TuInsField
      TuMerge
      TuName
      TuProject
      utime
      _writeini
    Advanced Functions
    Database Access
    Global Variables
    Form Fields
    Server Variables
    Sessions
    heitml Syntax
  Component Ref.
  Class Library
  User Components
  Tutorial
  New Features
  heitml 1
User Guide
Services
Privacy
Datenschutz
 
Contact / Impressum