Skip to content

Main content

Obstetric Research Gestation Weekday Token Tool

Parse a supplied weeks-plus-days research token.

Loading tool…

Description

Parse a supplied weeks-plus-days research token.

Pregnancy and birth research records distinguish observed and estimated values, dating anchors, day coordinates, time precision, clock offsets, and source permissions. A notation conversion or interval comparison does not determine a clinical date or validate consent. The supplied reference convention and uncertainty need to remain visible.

Parse a supplied weeks-plus-days research token.

When to use this tool

Use Obstetric Research Gestation Weekday Token when you need this supplied research age, date, interval, clock, provenance, or record-rule calculation.

How to use the tool and how it works

  1. Enter token. Use the units and conventions below.
  2. Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
  3. Read weeks, days, totalDays. Use the output convention below.

Accept a nonnegative whole-week token without redundant leading zeros, a plus sign, and one day digit from zero through six. Return weeks, days, and totalDays=weeks*7+days.1

Input fieldMeaning and unitsAccepted input
tokenWhole weeks plus one day digit, such as 12+3; days range zero through six.Required. Text; maximum UTF-16 length 8192.
Output fieldInterpretationReturned shape
weeksWeeksRequired. Safe integer.
daysDaysRequired. Safe integer.
totalDaysTotal DaysRequired. Safe integer.
json
{
  "input": {
    "token": "12+3"
  },
  "output": {
    "weeks": 12,
    "days": 3,
    "totalDays": 87
  }
}

Limitations and assumptions

  • This is notation conversion, not determination of gestational age, a clinical plausibility check, or a week-specific care recommendation. Very large total-day results outside the safe integer range are rejected.
  • Inputs must satisfy both the field types and the cross-field conditions above. Invalid input causes an error; a successful false flag or documented placeholder is a different result.

Alternative or Complementary methods

Use verified dates and sources together with the intended research or clinical assessment process. Check dating anchors, clock conventions, uncertainty, and whether a supplied reporting rule is appropriate for the question.

References

  1. Calculation and input contract: obstetrics/obstetric-research-gestation-weekday-token — tool.io

Similar or alternative tools