SUEWS API Site
Documentation of SUEWS source code
Public Member Functions | Static Public Member Functions | Public Attributes | Private Member Functions | Private Attributes | List of all members
mod_datetime::datetime Interface Reference

Public Member Functions

procedure, pass, public getyear (self)
 
procedure, pass, public getmonth (self)
 
procedure, pass, public getday (self)
 
procedure, pass, public gethour (self)
 
procedure, pass, public getminute (self)
 
procedure, pass, public getsecond (self)
 
procedure, pass, public getmillisecond (self)
 
procedure, pass, public gettz (self)
 
procedure, pass, public isocalendar (self)
 
procedure, pass, public isoformat (self, sep)
 
procedure, pass, public isvalid (self)
 
procedure, pass, public secondssinceepoch (self)
 
procedure, pass, public strftime (self, format)
 
procedure, pass, public tm (self)
 
procedure, pass, public tzoffset (self)
 
procedure, pass, public utc (self)
 
procedure, pass, public weekday (self)
 
procedure, pass, public isoweekday (self)
 
procedure, pass, public weekdaylong (self)
 
procedure, pass, public isoweekdaylong (self)
 
procedure, pass, public weekdayshort (self)
 
procedure, pass, public isoweekdayshort (self)
 
procedure, pass, public yearday (self)
 
GENERIC operator datetime_plus_timedelta, timedelta_plus_datetime
 
GENERIC operator datetime_minus_datetime, datetime_minus_timedelta
 
GENERIC operator (d0, d1)
 
GENERIC operator (d0, d1)
 
GENERIC operator (d0, d1)
 
GENERIC operator (d0, d1)
 
GENERIC operator (d0, d1)
 
GENERIC operator (d0, d1)
 
pure elemental type(datetime) function datetime_constructor (year, month, day, hour, minute, second, millisecond, tz)
 

Static Public Member Functions

procedure, nopass, public now ()
 

Public Attributes

integer month = 1
 
integer day = 1
 
integer hour = 0
 
integer minute = 0
 
integer second = 0
 
integer millisecond = 0
 
real(kind=real64) tz = 0
 

Private Member Functions

procedure, pass, private addmilliseconds (self, ms)
 
procedure, pass, private addseconds (self, s)
 
procedure, pass, private addminutes (self, m)
 
procedure, pass, private addhours (self, h)
 
procedure, pass, private adddays (self, d)
 
procedure, pass, private datetime_plus_timedelta (d0, t)
 
procedure, pass, private timedelta_plus_datetime (t, d0)
 
procedure, pass, private datetime_minus_datetime (d0, d1)
 
procedure, pass, private datetime_minus_timedelta (d0, t)
 
procedure, pass, private eq (d0, d1)
 
procedure, pass, private neq (d0, d1)
 
procedure, pass, private gt (d0, d1)
 
procedure, pass, private ge (d0, d1)
 
procedure, pass, private lt (d0, d1)
 
procedure, pass, private le (d0, d1)
 

Private Attributes

integer year = 1
 

Detailed Description

Definition at line 475 of file suews_util_datetime.f95.

Member Function/Subroutine Documentation

◆ adddays()

procedure, pass, private mod_datetime::datetime::adddays ( class(datetime), intent(inout) self,
integer, intent(in) d )
private

Definition at line 526 of file suews_util_datetime.f95.

◆ addhours()

procedure, pass, private mod_datetime::datetime::addhours ( class(datetime), intent(inout) self,
integer, intent(in) h )
private

Definition at line 525 of file suews_util_datetime.f95.

◆ addmilliseconds()

procedure, pass, private mod_datetime::datetime::addmilliseconds ( class(datetime), intent(inout) self,
integer, intent(in) ms )
private

Definition at line 522 of file suews_util_datetime.f95.

◆ addminutes()

procedure, pass, private mod_datetime::datetime::addminutes ( class(datetime), intent(inout) self,
integer, intent(in) m )
private

Definition at line 524 of file suews_util_datetime.f95.

◆ addseconds()

procedure, pass, private mod_datetime::datetime::addseconds ( class(datetime), intent(inout) self,
integer, intent(in) s )
private

Definition at line 523 of file suews_util_datetime.f95.

◆ datetime_constructor()

pure elemental type(datetime) function mod_datetime::datetime::datetime_constructor ( integer, intent(in), optional year,
integer, intent(in), optional month,
integer, intent(in), optional day,
integer, intent(in), optional hour,
integer, intent(in), optional minute,
integer, intent(in), optional second,
integer, intent(in), optional millisecond,
real(kind=real64), intent(in), optional tz )

Definition at line 560 of file suews_util_datetime.f95.

562
563 !! Constructor function for the `datetime` class.
564
565 INTEGER, INTENT(in), OPTIONAL :: year !! year
566 INTEGER, INTENT(in), OPTIONAL :: month !! month
567 INTEGER, INTENT(in), OPTIONAL :: day !! day
568 INTEGER, INTENT(in), OPTIONAL :: hour !! hour
569 INTEGER, INTENT(in), OPTIONAL :: minute !! minute
570 INTEGER, INTENT(in), OPTIONAL :: second !! second
571 INTEGER, INTENT(in), OPTIONAL :: millisecond !! millisecond
572 REAL(kind=real64), INTENT(in), OPTIONAL :: tz !! timezone offset in hours
573
574 IF (PRESENT(year)) THEN
575 datetime_constructor%year = year
576 ELSE
577 datetime_constructor%year = 1
578 END IF
579
580 IF (PRESENT(month)) THEN
581 datetime_constructor%month = month
582 ELSE
583 datetime_constructor%month = 1
584 END IF
585
586 IF (PRESENT(day)) THEN
587 datetime_constructor%day = day
588 ELSE
589 datetime_constructor%day = 1
590 END IF
591
592 IF (PRESENT(hour)) THEN
593 datetime_constructor%hour = hour
594 ELSE
595 datetime_constructor%hour = 0
596 END IF
597
598 IF (PRESENT(minute)) THEN
599 datetime_constructor%minute = minute
600 ELSE
601 datetime_constructor%minute = 0
602 END IF
603
604 IF (PRESENT(second)) THEN
605 datetime_constructor%second = second
606 ELSE
607 datetime_constructor%second = 0
608 END IF
609
610 IF (PRESENT(millisecond)) THEN
611 datetime_constructor%millisecond = millisecond
612 ELSE
613 datetime_constructor%millisecond = 0
614 END IF
615
616 IF (PRESENT(tz)) THEN
617 datetime_constructor%tz = tz
618 ELSE
619 datetime_constructor%tz = 0
620 END IF
621

References mod_datetime::datetime_constructor().

Here is the call graph for this function:

◆ datetime_minus_datetime()

procedure, pass, private mod_datetime::datetime::datetime_minus_datetime ( class(datetime), intent(in) d0,
class(datetime), intent(in) d1 )
private

Definition at line 531 of file suews_util_datetime.f95.

◆ datetime_minus_timedelta()

procedure, pass, private mod_datetime::datetime::datetime_minus_timedelta ( class(datetime), intent(in) d0,
class(timedelta), intent(in) t )
private

Definition at line 532 of file suews_util_datetime.f95.

◆ datetime_plus_timedelta()

procedure, pass, private mod_datetime::datetime::datetime_plus_timedelta ( class(datetime), intent(in) d0,
class(timedelta), intent(in) t )
private

Definition at line 529 of file suews_util_datetime.f95.

◆ eq()

procedure, pass, private mod_datetime::datetime::eq ( class(datetime), intent(in) d0,
class(datetime), intent(in) d1 )
private

Definition at line 533 of file suews_util_datetime.f95.

◆ ge()

procedure, pass, private mod_datetime::datetime::ge ( class(datetime), intent(in) d0,
class(datetime), intent(in) d1 )
private

Definition at line 536 of file suews_util_datetime.f95.

◆ getday()

procedure, pass, public mod_datetime::datetime::getday ( class(datetime), intent(in) self)

Definition at line 496 of file suews_util_datetime.f95.

◆ gethour()

procedure, pass, public mod_datetime::datetime::gethour ( class(datetime), intent(in) self)

Definition at line 497 of file suews_util_datetime.f95.

◆ getmillisecond()

procedure, pass, public mod_datetime::datetime::getmillisecond ( class(datetime), intent(in) self)

Definition at line 500 of file suews_util_datetime.f95.

◆ getminute()

procedure, pass, public mod_datetime::datetime::getminute ( class(datetime), intent(in) self)

Definition at line 498 of file suews_util_datetime.f95.

◆ getmonth()

procedure, pass, public mod_datetime::datetime::getmonth ( class(datetime), intent(in) self)

Definition at line 495 of file suews_util_datetime.f95.

◆ getsecond()

procedure, pass, public mod_datetime::datetime::getsecond ( class(datetime), intent(in) self)

Definition at line 499 of file suews_util_datetime.f95.

◆ gettz()

procedure, pass, public mod_datetime::datetime::gettz ( class(datetime), intent(in) self)

Definition at line 501 of file suews_util_datetime.f95.

◆ getyear()

procedure, pass, public mod_datetime::datetime::getyear ( class(datetime), intent(in) self)

Definition at line 494 of file suews_util_datetime.f95.

◆ gt()

procedure, pass, private mod_datetime::datetime::gt ( class(datetime), intent(in) d0,
class(datetime), intent(in) d1 )
private

Definition at line 535 of file suews_util_datetime.f95.

◆ isocalendar()

procedure, pass, public mod_datetime::datetime::isocalendar ( class(datetime), intent(in) self)

Definition at line 504 of file suews_util_datetime.f95.

◆ isoformat()

procedure, pass, public mod_datetime::datetime::isoformat ( class(datetime), intent(in) self,
character(len=1), intent(in), optional sep )

Definition at line 505 of file suews_util_datetime.f95.

◆ isoweekday()

procedure, pass, public mod_datetime::datetime::isoweekday ( class(datetime), intent(in) self)

Definition at line 514 of file suews_util_datetime.f95.

◆ isoweekdaylong()

procedure, pass, public mod_datetime::datetime::isoweekdaylong ( class(datetime), intent(in) self)

Definition at line 516 of file suews_util_datetime.f95.

◆ isoweekdayshort()

procedure, pass, public mod_datetime::datetime::isoweekdayshort ( class(datetime), intent(in) self)

Definition at line 518 of file suews_util_datetime.f95.

◆ isvalid()

procedure, pass, public mod_datetime::datetime::isvalid ( class(datetime), intent(in) self)

Definition at line 506 of file suews_util_datetime.f95.

◆ le()

procedure, pass, private mod_datetime::datetime::le ( class(datetime), intent(in) d0,
class(datetime), intent(in) d1 )
private

Definition at line 538 of file suews_util_datetime.f95.

◆ lt()

procedure, pass, private mod_datetime::datetime::lt ( class(datetime), intent(in) d0,
class(datetime), intent(in) d1 )
private

Definition at line 537 of file suews_util_datetime.f95.

◆ neq()

procedure, pass, private mod_datetime::datetime::neq ( class(datetime), intent(in) d0,
class(datetime), intent(in) d1 )
private

Definition at line 534 of file suews_util_datetime.f95.

◆ now()

procedure, nopass, public mod_datetime::datetime::now
static

Definition at line 507 of file suews_util_datetime.f95.

◆ operator() [1/8]

GENERIC mod_datetime::datetime::operator ( class(datetime), intent(in) d0,
class(datetime), intent(in) d1 )

Definition at line 544 of file suews_util_datetime.f95.

References mod_timedelta::eq().

Here is the call graph for this function:

◆ operator() [2/8]

GENERIC mod_datetime::datetime::operator ( class(datetime), intent(in) d0,
class(datetime), intent(in) d1 )

Definition at line 545 of file suews_util_datetime.f95.

References mod_timedelta::neq().

Here is the call graph for this function:

◆ operator() [3/8]

GENERIC mod_datetime::datetime::operator ( class(datetime), intent(in) d0,
class(datetime), intent(in) d1 )

Definition at line 546 of file suews_util_datetime.f95.

References mod_timedelta::gt().

Here is the call graph for this function:

◆ operator() [4/8]

GENERIC mod_datetime::datetime::operator ( class(datetime), intent(in) d0,
class(datetime), intent(in) d1 )

Definition at line 547 of file suews_util_datetime.f95.

References mod_timedelta::ge().

Here is the call graph for this function:

◆ operator() [5/8]

GENERIC mod_datetime::datetime::operator ( class(datetime), intent(in) d0,
class(datetime), intent(in) d1 )

Definition at line 548 of file suews_util_datetime.f95.

References mod_timedelta::lt().

Here is the call graph for this function:

◆ operator() [6/8]

GENERIC mod_datetime::datetime::operator ( class(datetime), intent(in) d0,
class(datetime), intent(in) d1 )

Definition at line 549 of file suews_util_datetime.f95.

References mod_datetime::datetime_constructor(), and mod_timedelta::le().

Here is the call graph for this function:

◆ operator() [7/8]

GENERIC mod_datetime::datetime::operator

Definition at line 542 of file suews_util_datetime.f95.

References mod_datetime::datetime_minus_datetime(), and mod_datetime::datetime_minus_timedelta().

Here is the call graph for this function:

◆ operator() [8/8]

GENERIC mod_datetime::datetime::operator

Definition at line 540 of file suews_util_datetime.f95.

References mod_datetime::datetime_plus_timedelta(), and mod_datetime::timedelta_plus_datetime().

Here is the call graph for this function:

◆ secondssinceepoch()

procedure, pass, public mod_datetime::datetime::secondssinceepoch ( class(datetime), intent(in) self)

Definition at line 508 of file suews_util_datetime.f95.

◆ strftime()

procedure, pass, public mod_datetime::datetime::strftime ( class(datetime), intent(in) self,
character(len=*), intent(in) format )

Definition at line 509 of file suews_util_datetime.f95.

◆ timedelta_plus_datetime()

procedure, pass, private mod_datetime::datetime::timedelta_plus_datetime ( class(timedelta), intent(in) t,
class(datetime), intent(in) d0 )
private

Definition at line 530 of file suews_util_datetime.f95.

◆ tm()

procedure, pass, public mod_datetime::datetime::tm ( class(datetime), intent(in) self)

Definition at line 510 of file suews_util_datetime.f95.

◆ tzoffset()

procedure, pass, public mod_datetime::datetime::tzoffset ( class(datetime), intent(in) self)

Definition at line 511 of file suews_util_datetime.f95.

◆ utc()

procedure, pass, public mod_datetime::datetime::utc ( class(datetime), intent(in) self)

Definition at line 512 of file suews_util_datetime.f95.

◆ weekday()

procedure, pass, public mod_datetime::datetime::weekday ( class(datetime), intent(in) self)

Definition at line 513 of file suews_util_datetime.f95.

◆ weekdaylong()

procedure, pass, public mod_datetime::datetime::weekdaylong ( class(datetime), intent(in) self)

Definition at line 515 of file suews_util_datetime.f95.

◆ weekdayshort()

procedure, pass, public mod_datetime::datetime::weekdayshort ( class(datetime), intent(in) self)

Definition at line 517 of file suews_util_datetime.f95.

◆ yearday()

procedure, pass, public mod_datetime::datetime::yearday ( class(datetime), intent(in) self)

Definition at line 519 of file suews_util_datetime.f95.

Member Data Documentation

◆ day

integer mod_datetime::datetime::day = 1

Definition at line 483 of file suews_util_datetime.f95.

483 INTEGER :: day = 1 !! day in month [1-31]

◆ hour

integer mod_datetime::datetime::hour = 0

Definition at line 484 of file suews_util_datetime.f95.

484 INTEGER :: hour = 0 !! hour in day [0-23]

◆ millisecond

integer mod_datetime::datetime::millisecond = 0

Definition at line 487 of file suews_util_datetime.f95.

487 INTEGER :: millisecond = 0 !! milliseconds in second [0-999]

◆ minute

integer mod_datetime::datetime::minute = 0

Definition at line 485 of file suews_util_datetime.f95.

485 INTEGER :: minute = 0 !! minute in hour [0-59]

◆ month

integer mod_datetime::datetime::month = 1

Definition at line 482 of file suews_util_datetime.f95.

482 INTEGER :: month = 1 !! month in year [1-12]

◆ second

integer mod_datetime::datetime::second = 0

Definition at line 486 of file suews_util_datetime.f95.

486 INTEGER :: second = 0 !! second in minute [0-59]

◆ tz

real(kind=real64) mod_datetime::datetime::tz = 0

Definition at line 489 of file suews_util_datetime.f95.

489 REAL(kind=real64) :: tz = 0 !! timezone offset from UTC [hours]

◆ year

integer mod_datetime::datetime::year = 1
private

Definition at line 481 of file suews_util_datetime.f95.

481 INTEGER :: year = 1 !! year [1-HUGE(year)]

The documentation for this interface was generated from the following file: