libsim Versione 7.2.6
|
◆ timedelta_getval()
Restituisce il valore di un oggetto timedelta in una o pi� modalit� desiderate. Qualsiasi combinazione dei parametri opzionali � consentita. oraclesimedate � obsoleto, usare piuttosto simpledate.
Definizione alla linea 1696 del file datetime_class.F90. 1699
1700
1701TYPE(cyclicdatetime) :: this !< oggetto da inizializzare
1702
1703if (present(chardate)) then
1704
1705 ltendaysp=imiss
1706 lmonth=imiss
1707 lday=imiss
1708 lhour=imiss
1709 lminute=imiss
1710
1711 if (c_e(chardate))then
1712 ! TMMGGhhmm
1713 read(chardate(1:1),'(i1)',iostat=ios)ltendaysp
1714 !print*,chardate(1:1),ios,ltendaysp
1715 if (ios /= 0)ltendaysp=imiss
1716
1717 read(chardate(2:3),'(i2)',iostat=ios)lmonth
1718 !print*,chardate(2:3),ios,lmonth
1719 if (ios /= 0)lmonth=imiss
1720
1721 read(chardate(4:5),'(i2)',iostat=ios)lday
1722 !print*,chardate(4:5),ios,lday
1723 if (ios /= 0)lday=imiss
1724
1725 read(chardate(6:7),'(i2)',iostat=ios)lhour
1726 !print*,chardate(6:7),ios,lhour
1727 if (ios /= 0)lhour=imiss
1728
1729 read(chardate(8:9),'(i2)',iostat=ios)lminute
1730 !print*,chardate(8:9),ios,lminute
1731 if (ios /= 0)lminute=imiss
1732 end if
1733
1734 this%tendaysp=ltendaysp
1735 this%month=lmonth
1736 this%day=lday
1737 this%hour=lhour
1738 this%minute=lminute
1739else
1740 this%tendaysp=optio_l(tendaysp)
1741 this%month=optio_l(month)
1742 this%day=optio_l(day)
1743 this%hour=optio_l(hour)
1744 this%minute=optio_l(minute)
1745end if
1746
1747END FUNCTION cyclicdatetime_new
1748
1749!> Restituisce una rappresentazione carattere stampabile di un oggetto
1750!! \a cyclicdatetime.
1751elemental FUNCTION cyclicdatetime_to_char(this) RESULT(char)
1752TYPE(cyclicdatetime),INTENT(IN) :: this
1753
1754CHARACTER(len=80) :: char
1755
1756char=to_char(this%tendaysp)//";"//to_char(this%month)//";"//to_char(this%day)//";"//&
1757to_char(this%hour)//";"//to_char(this%minute)
1758
1759END FUNCTION cyclicdatetime_to_char
1760
1761
1762!> Restituisce una rappresentazione convenzionale in forma datetime
1763!! \a cyclicdatetime.
1764!! The following conventional code values are used to specify which data was taken into account in the computation:
1765!! year=1001 : dayly values of a specified month (depends by day and month)
1766!! year=1002 : dayly,hourly values of a specified month (depends by day and month and hour)
1767!! year=1003 : 10 day period of a specified month (depends by day(1,11,21) and month)
1768!! year=1004 : 10 day period of a specified month,hourly (depends by day(1,11,21) and month and hour)
1769!! year=1005 : mounthly values (depend by month)
1770!! year=1006 : mounthly,hourly values (depend by month and hour)
1771!! year=1007 : yearly values (no other time dependence)
1772!! year=1008 : yearly,hourly values (depend by year and hour)
1773!! The other conventional month hour and minute should be 01 when they are not significative, day should be 1 or, if year=1003 or year=1004 is used, 1,11 or 21.
1774FUNCTION cyclicdatetime_to_conventional(this) RESULT(dtc)
1775TYPE(cyclicdatetime),INTENT(IN) :: this !< cycliddatetime to use in compute
|