समय/संख्याएं
ISO 8601 अवधि पार्सर
"P3Y6M4DT12H30M5S" जैसी स्ट्रिंग को समझने योग्य रूप में पार्स करें, या साल/महीने/दिन/घंटे/मिनट/सेकंड से ऐसी स्ट्रिंग बनाएं।
खाली फ़ील्ड = 0; शून्य फ़ील्ड स्ट्रिंग में शामिल नहीं होतीं। हफ़्तों का कॉम्पोनेंट (P4W) केवल पार्सिंग में सपोर्टेड है — बनाने के लिए दिन का उपयोग करें।
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.
इस टूल के बारे में लेख: ISO 8601 Duration: स्टैंडर्ड फ़ॉर्मैट में अवधि कैसे लिखें
अक्सर पूछे जाने वाले प्रश्न
P3Y6M4DT12H30M5S जैसी स्ट्रिंग का क्या मतलब है?
यह अवधि के लिए मानक ISO 8601 फ़ॉर्मेट है: P का मतलब "period" है, फिर T अक्षर तक वर्ष/महीने/दिन आते हैं, जिसके बाद घंटे/मिनट/सेकंड आते हैं। इस उदाहरण में यह 3 साल, 6 महीने, 4 दिन, 12 घंटे, 30 मिनट और 5 सेकंड है।
ISO अवधि साधारण घंटों की अवधि से कैसे अलग है?
निश्चित इकाइयों (जैसे ड्यूरेशन कैलकुलेटर में) के विपरीत, यहां "वर्ष" और "महीने" घटक कैलेंडर-आधारित हैं और इनमें सेकंडों की निश्चित संख्या नहीं होती — उनकी सटीक लंबाई उन विशिष्ट तारीखों पर निर्भर करती है जिन पर वे लागू होते हैं।
क्या हफ़्ते का फ़ॉर्मेट P4W सपोर्टेड है?
हां, लेकिन केवल मौजूदा स्ट्रिंग पार्स करते समय। अपनी खुद की स्ट्रिंग बनाते समय, हफ़्तों को दिनों में व्यक्त करना ज़रूरी है, क्योंकि ISO 8601 एक ही स्ट्रिंग में हफ़्तों को अन्य घटकों के साथ मिलाने की अनुमति नहीं देता।
क्या फ़्रैक्शनल सेकंड या मिनट दर्ज किए जा सकते हैं?
हां, स्टैंडर्ड सिर्फ़ स्ट्रिंग के आख़िरी कॉम्पोनेंट में फ़्रैक्शनल भाग की इजाज़त देता है — जैसे PT1.5S (1.5 सेकंड) या PT1H30.5M (1 घंटा 30.5 मिनट) मान्य हैं, लेकिन आख़िरी को छोड़कर किसी अन्य कॉम्पोनेंट में फ़्रैक्शनल भाग मान्य नहीं है।
क्या नेगेटिव ISO अवधियां भी होती हैं?
बेसिक ISO 8601 स्टैंडर्ड अवधि के लिए कोई साइन तय नहीं करता, लेकिन कुछ इम्प्लीमेंटेशन (इस टूल सहित) "पहले" या उलटी अवधि दिखाने के लिए शुरुआत में माइनस साइन सपोर्ट करते हैं — यह आम है, हालांकि अनौपचारिक एक्सटेंशन है।