What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more

To calculate a security-deposit deadline in JavaScript, keep the date as a civil date—year, month, and day—and apply the rule for the specific state and event. Do not treat every deadline as “move-out date plus N × 24 hours.” The five states below use different triggers, day-count rules, and required outputs; Texas and Arizona also have prerequisites that can change when the clock starts.

What date is the deadline actually based on?

First identify what the landlord must do: return a deposit, send an itemized statement, give notice of an intended claim, or take more than one of those steps. Then identify the event that starts the relevant clock. A tenant’s move-out date is not automatically the statutory trigger in every state.

The state rules below are residential rules summarized from official sources checked on October 7, 2026. They are a comparative guide, not an individualized legal determination. A lease, tenancy type, local rule, later statutory amendment, or the facts of possession and notice may affect the result.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
State Requirement and trigger What a calculator must represent
California California Courts’ “Guide to security deposits in California” says that after the tenant moves out, the landlord has 21 days to return the deposit or remaining balance with an itemized statement. If repairs cannot reasonably be completed within 21 days, the landlord may use a good-faith estimate; receipts follow within 14 days after the repairs are done. A 21-day post-move-out calendar-day rule, plus a separate repair-completion event and 14-day follow-up interval when an estimate is used. The guidance summarized here does not state a weekend extension.
Texas Texas Property Code §92.103(a) requires a refund on or before the 30th day after surrender of the premises, subject to §92.107. Under §92.107, the landlord is not obligated to return the deposit or provide the written description until the tenant gives a written forwarding address. Track surrender and written-forwarding-address status separately. A move-out date alone cannot establish whether the obligation has attached.
Florida Florida Statutes §83.49 (2026) sets different timelines: when no claim is intended, return the deposit within 15 days after termination; when a claim is intended, give notice within 30 days. If the tenant does not object within 15 days after receiving the notice, remit the balance within 30 days after the notice date. Calculate separate outputs for a no-claim refund, claim notice, the tenant’s objection window, and any balance remittance. These are not one interchangeable “deposit deadline.”
Arizona A.R.S. §33-1321(D) requires an itemized list and any balance due within 14 days, excluding Saturdays, Sundays, and other legal holidays, after termination, delivery of possession, and tenant demand. Represent all three triggering events and count eligible days, excluding weekends and applicable legal holidays. Do not use a simple 14-calendar-day addition.
New York General Obligations Law §7-108(1-a)(e) requires the itemized statement and remaining deposit within 14 days after the tenant vacates. Failure to comply forfeits the right to retain any portion of the deposit. Use the 14-day rule in the statute checked for this comparison. A 2025–2026 proposal to change 14 days to 30 days was referred to committee, not enacted, according to the New York State Senate bill page checked on October 7, 2026.

These rules do not establish every jurisdiction’s convention for whether the trigger day is excluded, how a deadline falling on a holiday is handled, or whether a local overlay applies. The phrases “within,” “on or before,” and “after” must be interpreted under the applicable law. Do not infer a general weekend extension for a state whose rule is expressed in calendar days.

Model dates as civil dates, not elapsed milliseconds

A date-only value such as 2026-05-29 describes a day on a calendar, not a moment in a time zone. JavaScript date parsing and local-time display can disagree about which civil day that value represents. In particular, parsing an ISO date-only string and then formatting the resulting instant in local time can display the previous day in some time zones.

Keep the date components explicit for arithmetic, validate user input, and format the result in UTC if using JavaScript’s built-in Date object. This prevents a time-zone conversion from changing the displayed day. It does not decide the legal counting convention; that belongs in the jurisdiction’s rule logic.

function parseCivilDate(value) {
  const match = /^(d{4})-(d{2})-(d{2})$/.exec(value);
  if (!match) throw new Error("Use YYYY-MM-DD");

  const year = Number(match[1]);
  const month = Number(match[2]);
  const day = Number(match[3]);
  const date = new Date(0);
  date.setUTCHours(0, 0, 0, 0);
  date.setUTCFullYear(year, month - 1, day);

  if (date.getUTCFullYear() !== year ||
      date.getUTCMonth() !== month - 1 ||
      date.getUTCDate() !== day) {
    throw new Error("Invalid calendar date");
  }
  return date;
}

function addCalendarDays(date, days) {
  const result = new Date(date.getTime());
  result.setUTCDate(result.getUTCDate() + days);
  return result;
}

function formatCivilDate(date) {
  return new Intl.DateTimeFormat("en-CA", {
    timeZone: "UTC",
    year: "numeric",
    month: "2-digit",
    day: "2-digit"
  }).format(date);
}

const moveOut = parseCivilDate("2026-05-29");
const candidate = addCalendarDays(moveOut, 21);
console.log(formatCivilDate(candidate));

This example adds 21 days to the supplied date as arithmetic, treating the trigger date as day zero. It is a candidate calculation, not a legal conclusion that a particular statute counts that way. Confirm the governing trigger-day convention before using the result as a final deadline.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Keep each state’s rule data separate from the date functions

A calculator should store the legal rule as structured data rather than embedding a single day count in a universal function. At minimum, a rule needs its jurisdiction and version, trigger event or events, duration, excluded weekdays and holidays, prerequisites, and required output. The five-state comparison shows why: Arizona needs holiday-aware counting and a tenant demand; Texas needs forwarding-address status; Florida has several distinct notices and deadlines.

For a simple calendar-day rule, a rule record might distinguish the event and output without asserting how the law treats the trigger day:

const rule = {
  jurisdiction: "California",
  sourceVersionChecked: "2026-10-07",
  trigger: "move-out",
  durationDays: 21,
  dayType: "calendar",
  output: "refund-or-itemized-statement",
  triggerDayConvention: "must-be-validated"
};

Use different rule records for alternative pathways. California’s good-faith repair estimate, for example, requires tracking when repairs are completed for the later receipt deadline. Florida needs separate records for its no-claim return, claim notice, objection period, and balance remittance. If a prerequisite is missing, return a status such as “not enough information to calculate” rather than inventing a due date.

Arizona needs an eligible-day counter

Arizona’s 14-day interval excludes Saturdays, Sundays, and legal holidays. A weekday counter can model weekend exclusions, but it cannot identify legal holidays unless the application supplies the applicable holiday calendar. The function below also makes explicit an assumption that counting begins on the day after the trigger. That convention must be checked against controlling law before it is used for a legal deadline.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
function addArizonaEligibleDays(triggerDate, days, legalHolidayKeys) {
  const result = new Date(triggerDate.getTime());
  let counted = 0;

  while (counted < days) {
    result.setUTCDate(result.getUTCDate() + 1);
    const weekday = result.getUTCDay();
    const key = formatCivilDate(result);
    const isWeekend = weekday === 0 || weekday === 6;
    const isHoliday = legalHolidayKeys.has(key);

    if (!isWeekend && !isHoliday) counted += 1;
  }
  return result;
}

The function is only a counting primitive: the caller must first determine the legally relevant trigger date from termination, delivery of possession, and tenant demand, and provide the correct legal-holiday dates. Do not reuse it for states whose summarized rule does not exclude weekends and holidays.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Handle prerequisites and multiple deadlines explicitly

Texas: wait for the written forwarding address condition

Store the surrender date and whether the tenant has provided a written forwarding address. Under the cited Texas provisions, the landlord’s refund and written-description obligations are not triggered until that address is given. A calculator that accepts only a move-out date may therefore report a misleading result.

Florida: distinguish notice, objection, and payment

For Florida, the no-claim path is a return within 15 days after termination. The claim path instead requires notice within 30 days. If the tenant does not object within 15 days after receiving that notice, the remaining balance is due within 30 days after the notice date. Track the notice date and the date the tenant received it as distinct data where the applicable rule uses each; do not derive the objection period from the landlord’s notice date.

California: track the repair estimate follow-up

Where repairs cannot reasonably be completed within the initial 21 days, California Courts’ guidance describes a good-faith estimate followed by receipts within 14 days after repairs are completed. An application should preserve the repair-completion date rather than treating the initial statement as the only event.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Make outputs explain the rule and its limits

A useful result should show more than a date. Include the state, the statutory rule version or “checked” date, the event used as the trigger, whether the output is a refund or an itemized notice, and any prerequisites that remain unmet. For Arizona, expose the holiday calendar used. For Florida, label each date by the step it applies to. This makes it possible for a tenant, landlord, or reviewer to spot incorrect inputs instead of treating a bare date as authoritative.

  • Test month-end and year-end transitions, leap days, weekends, and daylight-saving changes.
  • Test missing or late forwarding-address information for Texas and missing demand or possession dates for Arizona.
  • Test Florida’s objection timeline using the notice-receipt date separately from the notice date.
  • Have a qualified reviewer validate the governing counting convention and applicable holiday calendar for each jurisdiction before relying on the result.

The New York State Senate’s GOB §7-108 text is the source for the 14-day rule stated here; the separately checked 2025–2026 S4856 page shows a proposal referred to committee, not an enacted change. State rules can change, so a production calculator should version its rule data and recheck authoritative sources before presenting a deadline as current.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.