81trust / 100

Day Of Year

by Day of year in Productivity & SaaS

x402 APIPassing, checked 2 h ago

Get the day number within the year (1-366) for any date, plus days remaining, leap-year status, percent of year complete, and a simple (Sunday-start) week number.

POST https://agent402.tools/api/day-of-year

Last 30 days

All checks passedSome failedAll failedNot checked
Uptime
100%
Response time
279 ms typical, 279 ms slowest 5%
Last check
2 h ago
Next check
any minute now

How to call it

# See the payment challenge (nothing is charged)
curl -i -X POST "https://agent402.tools/api/day-of-year" \
  -H "content-type: application/json" \
  -d '{"date":"2026-06-23"}'
import { wrapFetchWithPayment } from "@x402/fetch";
import { x402Client } from "@x402/core/client";
import { ExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";

const client = new x402Client().register(
  "eip155:8453",
  new ExactEvmScheme(privateKeyToAccount(process.env.AGENT_KEY)),
);
const pay = wrapFetchWithPayment(fetch, client);

// Not sure it's safe to pay? Preflight it first for $0.03:
// GET https://toolvet.app/api/v1/check?url=https%3A%2F%2Fagent402.tools%2Fapi%2Fday-of-year
const res = await pay("https://agent402.tools/api/day-of-year", {
  method: "POST",
  headers: { "content-type": "application/json" },
  body: JSON.stringify({"date":"2026-06-23"}),
});
console.log(await res.json());

Example input

{
  "date": "2026-06-23"
}

Example output

{
  "date": "2026-06-23",
  "dayOfYear": 174,
  "daysInYear": 365,
  "daysRemaining": 191,
  "isLeapYear": false,
  "percentComplete": 47.7,
  "weekNumber": 26
}

Security scan

  • No findings. We scan names, descriptions and tool definitions for hidden instructions and other prompt-injection patterns.

Recent checks

WhenResultHTTPTimePrice
2 h agoPassed402279 ms$0.001