Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

dongli/fortran-datetime

Open more actions menu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

63 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Fortran Date Time Library

Content

Overview

This is a Fortran datetime library for doing tedious datetime operations.

Go to Top

Installation

A CMake-Setup is provided.

Go to Top

Example

use datetime

type(datetime_type) a, b
type(timedelta_type) dt

a = datetime(year=2017, month=10, day=6, hour=14)

write(6, *) a%isoformat() ! => 2017-10-06T14:00:00Z

dt = timedelta(minutes=6)
b = a + dt

write(6, *) a%isoformat() ! => 2017-10-06T14:06:00Z

b = datetime(year=2018, month=4, day=16, hour=23, minute=51)

dt = b - a

write(6, *) dt%total_seconds() ! => 16624260.0
write(6, *) dt%total_minutes() ! => 277071.0
write(6, *) dt%total_hours()   ! => 4617.85
write(6, *) dt%total_days()    ! => 192.4104166666667

Compiler Support

Compiler Compiler Compiler Compiler Compiler Compiler

Go to Top

License

License

Go to Top

About

Another Fortran datetime library

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  
Morty Proxy This is a proxified and sanitized view of the page, visit original site.