본문 바로가기

//ERDDAP/com.cohort.util/ScriptCalendar2/epochSecondsToLimitedIsoStringT

epochSecondsToLimitedIsoStringT

[JVM]
open fun epochSecondsToLimitedIsoStringT(time_precision: String, seconds: Double, NaNString: String): String

This is like safeEpochSecondsToIsoStringT3Z, but returns a limited precision string. This won't throw an exception.

Return

the formatted time string (or NaNString if trouble)

Parameters

JVM

time_precisioncan be "1970", "1970-01", "1970-01-01", "1970-01-01T00Z", "1970-01-01T00:00Z", "1970-01-01T00:00:00Z" (used if time_precision not matched), "1970-01-01T00:00:00.0Z", "1970-01-01T00:00:00.00Z", "1970-01-01T00:00:00.000Z". Or any of those without "Z". If time_precision ends in Z, the result will too. If time_precision doesn't end in Z, the result won't end in Z. Note that ERDDAP requires/forces/ensures any format with hours(min(sec)) to have Z.
secondsthe epochSeconds value
NaNStringthe value to return if seconds is not finite or is too big.