Duration.From
Verilen değerden bir süre oluşturur.
Syntax
Duration.From(
value as any
) as duration
Remarks
Verilen value değerinden bir duration değeri döndürür. Verilen value null ise Duration.From null döndürür. Verilen value duration ise value döndürülür. Aşağıdaki türde olan değerler bir duration değerine dönüştürülebilir:
text: Metin biçimindeki geçen zaman biçimlerinden birdurationdeğeri (g.s:d:s). Ayrıntılar için bkz.Duration.FromText.number:valueile ifade edilen tam ve kesirli günlerle eşdeğer birduration.
value başka bir türde olduğunda hata döndürülür.
Examples
Example #1
<code>2.525</code> değerini bir <code>duration</code> değerine dönüştürür.
Duration.From(2.525)
Result:
#duration(2, 12, 36, 0)
Category
Duration