Zaman/Sayılar
ISO 8601 Süre Ayrıştırıcı
"P3Y6M4DT12H30M5S" gibi bir diziyi okunabilir bir döküme ayrıştırın veya yıl/ay/gün/saat/dakika/saniyeden böyle bir dizi oluşturun.
Boş alan = 0; sıfır alanlar dizeye dahil edilmez. Hafta bileşeni (P4W) yalnızca ayrıştırmada desteklenir — oluşturmak için gün kullanın.
An ISO 8601 duration (e.g. P3Y6M4DT12H30M5S) is a compact, unambiguous way to write a time span, used by many APIs and data formats, but hard to read without parsing it. This tool translates such a string into plain language and lets you build one from separate fields.
How to use it
- Parse: paste an ISO duration string to get years, months, days, hours, minutes, and seconds broken out separately, in a readable form.
- Build: enter the duration components you need and the tool assembles a valid ISO 8601 string.
- The letter T before the time part (hours/minutes/seconds) is required and gets added automatically when needed.
Common uses
- Reading a duration field from an API response (a subscription, a rental period, a timeout) given in this format.
- Building a correctly formatted ISO 8601 string for a request that expects a duration in exactly this format.
- Debugging why a third-party API's parser rejects a hand-built duration — checking it against the standard's exact syntax.
Things to keep in mind
The leading P stands for "period" and is required, just like the T that separates days from hours in the time part.
The base standard doesn't define a sign for durations — negative durations (to mean "ago") are only supported by specific implementations as an unofficial extension.
Bu araç hakkında makale: ISO 8601 Duration: bir süre standart biçimde nasıl yazılır
Sıkça sorulan sorular
P3Y6M4DT12H30M5S gibi bir dize ne anlama gelir?
Bu, standart ISO 8601 süre biçimidir: P "period" (dönem) anlamına gelir, ardından T harfine kadar yıl/ay/gün gelir, ondan sonra saat/dakika/saniye gelir. Bu örnekte bu, 3 yıl, 6 ay, 4 gün, 12 saat, 30 dakika ve 5 saniyedir.
ISO süresi saat cinsinden basit bir süreden nasıl farklıdır?
Sabit birimlerin aksine (süre hesaplayıcısındaki gibi), buradaki "yıl" ve "ay" bileşenleri takvime dayalıdır ve sabit bir saniye sayısına sahip değildir — kesin uzunlukları uygulandıkları belirli tarihlere bağlıdır.
Hafta biçimi P4W destekleniyor mu?
Evet, ancak yalnızca mevcut bir dizeyi ayrıştırırken. Kendi dizenizi oluştururken, haftaların gün olarak ifade edilmesi gerekir, çünkü ISO 8601 haftaları tek bir dizede diğer bileşenlerle birleştirmeye izin vermez.
Kesirli saniye veya dakika belirtebilir miyim?
Evet, standart yalnızca dizenin son bileşeninde kesirli kısma izin verir — örneğin PT1.5S (1,5 saniye) veya PT1H30.5M (1 saat 30,5 dakika) geçerlidir, ama son olmayan bir bileşende kesirli kısım geçerli değildir.
Negatif ISO süreleri var mı?
Temel ISO 8601 standardı süreler için bir işaret tanımlamaz, ancak bazı uygulamalar (bu araç dahil) "önce" veya ters bir süreyi ifade etmek için başa eksi işareti eklemeyi destekler — bu yaygın ama resmi olmayan bir uzantıdır.