Skip to content

This is a simple ABAP class that is a port of PHP's datetime class for easy formatting of date/time strings

Notifications You must be signed in to change notification settings

squarecloudlabs/datetime

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

datetime

This is a simple ABAP class that is a port of PHP's datetime class for easy formatting of date/time strings

It is not complete at this time but the format (initially the most useful method for me) is 'mostly complete'

It will enable you to do something like this:

REPORT  z_hello_datetime.
 
  DATA:
        dt type REF TO zcl_datetime
      , fs type string
      , ts type timestamp
      .
 
  GET TIME STAMP FIELD ts.
 
  CREATE OBJECT dt
    EXPORTING timezone = sy-zonlo
              timestamp = ts.
 
  fs = dt->format( 'd M Y H:m' ).
  WRITE: / fs.  "22 May 2013 17:05 

About

This is a simple ABAP class that is a port of PHP's datetime class for easy formatting of date/time strings

Resources

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published