To calculate a security-deposit deadline in JavaScript, model the statute’s trigger and counting rules—not just a move-out date plus a number of days. California, Texas, Florida, Arizona, and New York differ in what starts the clock, what must be sent, and whether prerequisites or excluded days apply. Represent dates as civil dates, keep each state’s rule separate, and show the result without shifting it through a time zone.
How the five states define the deadline
A “security-deposit deadline” may refer to a refund, an itemized statement, a notice that the landlord intends to claim deductions, or more than one of these. The following residential rules are summarized from official state sources checked on October 7, 2026. They are not a determination of a particular tenant’s deadline: local rules, tenancy type, statutory changes, and the facts can matter.
As an Amazon Associate I earn from qualifying purchases.
| State | Rule summarized | What a calculator must represent | Source |
|---|---|---|---|
| California | Within 21 days after the tenant moves out, return the deposit or remaining balance with an itemized statement. If repairs cannot reasonably be completed in that period, a good-faith estimate may be used; receipts follow within 14 days after repairs are completed. | Return/accounting deadline, plus a conditional estimate-and-receipts path. | California Courts, “Guide to security deposits in California” |
| Texas | Refund on or before the 30th day after surrender, subject to the forwarding-address condition in §92.107: the landlord is not obligated to return the deposit or provide the written description until the tenant gives a written forwarding address. | Surrender date and forwarding-address status as distinct inputs. | Texas Property Code, Chapter 92, §§92.103(a), 92.107 |
| Florida | If no claim is intended, return the deposit within 15 days after termination. If a claim is intended, send notice within 30 days. If the tenant does not object within 15 days after receiving notice, remit the balance within 30 days after the notice date. | Separate outputs for a no-claim return, claim notice, objection window, and balance remittance. | Florida Statutes (2026), Chapter 83, §83.49 |
| Arizona | Within 14 days, excluding Saturdays, Sundays, and legal holidays, after termination, delivery of possession, and tenant demand, provide an itemized list and any balance due. | All three triggering events, plus a count that skips weekends and legal holidays. | A.R.S. §33-1321(D) |
| New York | Within 14 days after the tenant vacates, send an itemized statement and return the remaining deposit. Failure to comply forfeits the right to retain any portion. | Vacating date and both statement and refund obligations. | New York General Obligations Law §7-108(1-a)(e) |
Do not treat proposed New York legislation as current law
A New York Senate bill, 2025-S4856, proposing to change the period from 14 to 30 days was shown as referred to committee, not enacted, on the official bill page checked October 7, 2026. The comparison above uses the 14-day rule. Bill status can change, so verify the operative statute for the date and tenancy in question.
Recommended Free Tools
Separate legal counting from date arithmetic
Statutes use phrases such as “within,” “on or before,” and “after.” The summaries above do not establish every jurisdiction’s rule for whether the triggering day is counted, or how a deadline falling on a court holiday is treated. Do not silently assume a universal rule that the next day is day one, or that a weekend automatically moves a deadline. Arizona expressly excludes Saturdays, Sundays, and legal holidays; that exception should not be generalized to the other states.
#1 Best Overall
For a real deadline calculator, have the applicable counting convention and any local or tenancy-specific overlays validated independently. The calculation engine should receive a validated trigger date and counting policy; it should not infer legal rules from a JavaScript weekday function.
Represent a deadline as a civil date
A move-out date is usually a calendar date, not an instant in time. Store its year, month, and day, or use a plain-date type where the target runtime supports it. Avoid converting a date-only value to a local-time display: ISO date-only strings are interpreted as UTC by JavaScript, and formatting the resulting instant in a time zone west of UTC can show the previous civil date.
The following utilities demonstrate date-only validation, calendar-day addition, and a configurable count that skips weekend days and supplied legal-holiday dates. The counting function deliberately begins with the day after the trigger; that is an implementation convention for illustration, not a legal conclusion about any state. Supply a jurisdiction-validated policy and a complete holiday set before using it for a real deadline.
function parseCivilDate(value) {
const match = /^(d{4})-(d{2})-(d{2})$/.exec(value);
if (!match) throw new RangeError("Expected 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 RangeError("Invalid calendar date");
}
return date;
}
function formatCivilDate(date) {
const pad = (number) => String(number).padStart(2, "0");
return `${String(date.getUTCFullYear()).padStart(4, "0")}-` +
`${pad(date.getUTCMonth() + 1)}-${pad(date.getUTCDate())}`;
}
function addCalendarDays(triggerDate, numberOfDays) {
if (!Number.isInteger(numberOfDays) || numberOfDays < 0) {
throw new RangeError("numberOfDays must be a non-negative integer");
}
const result = new Date(triggerDate.getTime());
result.setUTCDate(result.getUTCDate() + numberOfDays);
return result;
}
function countEligibleDaysAfter(triggerDate, numberOfDays, holidays = new Set()) {
if (!Number.isInteger(numberOfDays) || numberOfDays < 0) {
throw new RangeError("numberOfDays must be a non-negative integer");
}
const result = new Date(triggerDate.getTime());
let counted = 0;
while (counted < numberOfDays) {
result.setUTCDate(result.getUTCDate() + 1);
const weekday = result.getUTCDay(); // Sunday 0; Saturday 6
const isWeekend = weekday === 0 || weekday === 6;
if (!isWeekend && !holidays.has(formatCivilDate(result))) counted++;
}
return result;
}
const moveOut = parseCivilDate("2026-05-29");
const illustrativeCalendarDate = formatCivilDate(addCalendarDays(moveOut, 21));
The final line is only an arithmetic illustration of adding 21 calendar days to a date. It does not resolve California’s legal counting convention or establish a tenant’s deadline. For an Arizona calculation, the holiday set must cover the relevant legal holidays, not merely federal holidays or dates chosen by a generic library.
Rank #3
Build state rules as data and events
Keep the rule definition separate from date utilities. A useful record can identify the jurisdiction and version, the event or events that start the clock, duration, excluded weekdays and holidays, prerequisites, and the type of obligation being calculated. Model the trigger as an event set rather than assuming every state starts from a single “move-out date.”
- California: use the move-out event for the 21-day return/accounting path; represent the repair estimate and later receipts as a conditional follow-up, not as a replacement deadline.
- Texas: track surrender and whether the tenant provided a written forwarding address. The 30-day period alone does not express the §92.107 condition.
- Florida: return separate results for the no-claim and claim paths. For a claim, track the notice date, the tenant’s receipt date for the objection window, and the remittance date rule separately.
- Arizona: require termination, delivery of possession, and tenant demand, then count the specified eligible days.
- New York: use the vacating event and represent the itemized statement and remaining-deposit return together; do not substitute the proposed 30-day bill for the enacted rule.
Include the jurisdiction and rule version in the displayed result, and make missing prerequisites visible instead of returning a misleading date. A Texas result with no forwarding-address status, for example, should report that the condition has not been established rather than imply the calculator knows when the obligation attaches.
Rank #4
Format and test the result without timezone drift
For a date-only result, format UTC calendar components explicitly, as formatCivilDate does, or use an explicitly UTC formatter. Do not take a UTC-midnight date and call local-time getters or format it in the visitor’s default time zone unless that behavior is intentional. A date-only result should remain the same civil date whether the user views it in California, New York, or elsewhere.
The Tool Desk
Outbyte PC Repair FREERepair Windows errors before they cause bigger problemsFix Now →Outbyte Driver Updater FREEScan for outdated or missing drivers - takes under a minuteDriver Scan →Before releasing a calculator, test boundary conditions against the chosen legal policy as well as the date code:
Best Value
- Month and year transitions, leap day, and invalid inputs such as February 30.
- Dates near weekends and each jurisdiction’s applicable legal holidays.
- Time-zone display in locations east and west of UTC, including daylight-saving transitions.
- Missing or delayed trigger events, including a Texas forwarding address and Arizona demand.
- Florida’s separate notice, objection, and remittance events.
- Rule-version changes and proposed bills that have not become law.
These are test cases to run, not claims that a particular implementation has been tested. A JavaScript date library can help with calendar arithmetic, but it cannot determine which event legally starts a clock, what holidays a statute excludes, or whether a tenant’s facts satisfy a statutory condition.
Sources and scope
The state summaries are based on California Courts’ “Guide to security deposits in California”; Texas Property Code Chapter 92; Florida Statutes (2026), §83.49; Arizona Revised Statutes §33-1321; and New York General Obligations Law §7-108. The New York proposal status is from the New York Senate’s 2025-S4856 bill page. The JavaScript timezone warning is consistent with the date-only parsing and local-formatting issue described in the title-matched DEV Community article; the implementation guidance above is engineering advice, not a quotation from a JavaScript standards source. Confirm the current statute and applicable local rules before relying on a calculated deadline.
Quick Recap
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.




