NETGeographicLib  1.48
Static Public Member Functions | List of all members
NETGeographicLib::Utility Class Reference

Utility library. More...

#include <NETGeographicLib/NETGeographicLib.h>

Static Public Member Functions

static double FractionalYear (System::String^ s)

Detailed Description

Utility library.

This class only exposes the GeographicLib::Utility::fractionalyear function.

Definition at line 270 of file NETGeographicLib.h.

Member Function Documentation

◆ FractionalYear()

static double NETGeographicLib::Utility::FractionalYear ( System::String^  s)

Convert a string representing a date to a fractional year.

[in]sthe string to be converted.
GeographicErrif s can't be interpreted as a date.
the fractional year.

The string is first read as an ordinary number (e.g., 2010 or 2012.5); if this is successful, the value is returned. Otherwise the string should be of the form yyyy-mm or yyyy-mm-dd and this is converted to a number with 2010-01-01 giving 2010.0 and 2012-07-03 giving 2012.5.

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