{"uid":"cap_VWNk6kXGQr64HyaO-PhdL","slug":"day-of-year-calculator-72ffebcf","name":"Day-of-Year Calculator","description":"Return the ordinal day of the year (1..366), the number of days in that year and whether it is a leap year.","url":"https://datetime.openverbs.com/v1/day-of-year","method":"POST","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method","bodyType","body"],"properties":{"body":{"type":"object","required":["year","month","day"],"properties":{"day":{"type":"integer","maximum":31,"minimum":1},"year":{"type":"integer","maximum":9999,"minimum":1},"month":{"type":"integer","maximum":12,"minimum":1}},"additionalProperties":false},"type":{"type":"string","const":"http"},"method":{"enum":["POST"],"type":"string"},"bodyType":{"enum":["json","form-data","text"],"type":"string"}},"additionalProperties":false}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.004","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.004/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.004","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.004","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_DD0sDZQvgwhEtlmqYkpw1","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.004","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Returns the ordinal day of the year (1–366), total days in that year, and whether the year is a leap year for a given Gregorian date.","exampleAgentPrompt":"What ordinal day of the year is September 23, 2025, and is 2025 a leap year?","exampleUseCases":[{"title":"Day-of-year for scientific logging","prompt":"I'm timestamping sensor readings by day-of-year — what ordinal day number is February 14, 2024, and does 2024 have 366 days?"},{"title":"Leap year check for payroll system","prompt":"We're building a payroll calendar — is 2028 a leap year, and what is the ordinal day number for December 31, 2028?"},{"title":"Progress-through-year tracking","prompt":"Tell me what day number of the year July 4, 2025 falls on so I can see how far through the year we are."}],"resultDescription":"Returns the ordinal day of the year (an integer from 1 to 366), the total number of days in that year (365 or 366), and a boolean indicating whether the year is a leap year.","failureModes":["Invalid date values (e.g. month 13, day 32) return a validation error","Year outside the range 1–9999 returns a schema validation error","Missing required fields (year, month, or day) return a 400-level error","Non-integer inputs for date components are rejected by schema validation"],"whenToPreferThis":"Use this endpoint when you need to convert a specific Gregorian calendar date into its ordinal day-of-year number, determine the total days in a year, or check for leap years — especially in date arithmetic, scientific logging, scheduling, or calendar display pipelines. Prefer over manual calculation when correctness for edge cases (leap years, century years) matters.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T18:30:23.759Z","isFirstParty":false}