formatNepaliDateTimeToIsoFormat

fun formatNepaliDateTimeToIsoFormat(nepaliDate: SimpleDate, time: SimpleTime = currentTime): String(source)

Converts a Nepali (Bikram Sambat) date and time to ISO 8601 UTC format.

The Nepali date (Bikram Sambat) is first converted to the equivalent Gregorian (English) date, and then the time is appended to produce a complete timestamp in UTC.

Return

A string in ISO 8601 format representing the UTC date and time. The result is in the format YYYY-MM-DDTHH:mm:ssZ (Zulu time).

Example:

val nepaliDate = SimpleDate(2081, 5, 24)  // Bikram Sambat date
val time = SimpleTime(14, 45, 15, 0)
val isoFormat = NepaliDateConverter.formatNepaliDateTimeToIsoFormat(nepaliDate, time)
println(isoFormat) // Outputs: "2024-09-09T09:00:15Z"

Parameters

nepaliDate

The date in the Nepali Bikram Sambat calendar as a SimpleDate.

time

The time of day as a SimpleTime, default is the current time.