Skip to main content
Stash v0.30.0+ introduced support for partial dates (fuzzy dates), allowing you to store dates with varying levels of precision. This guide explains how to work with fuzzy dates in the client library.

What Are Fuzzy Dates?

Fuzzy dates allow you to express dates when you don’t know the complete information:
  • Year only: "2024" - You know the year but not the month/day
  • Year-Month: "2024-03" - You know the year and month but not the day
  • Full date: "2024-03-15" - Complete date information
This is particularly useful for:
  • Performer birthdates when exact date is unknown
  • Scene release dates with only year/month known
  • Historical events with approximate dates

Date Precision Levels

The library defines three precision levels:

Working with Fuzzy Dates

Creating Fuzzy Dates

Validating Date Strings

Use the validation utility to check if a date string is valid:

Converting to Python datetime

Convert fuzzy dates to Python datetime objects:

Normalizing Dates

Convert between different precision levels:

Using Fuzzy Dates with Stash

Performer Birthdates

Scene Dates

Comparing Fuzzy Dates

Handling Unknown Dates

When dates are completely unknown, use None:

Best Practices

1. Use the Most Specific Precision Available

2. Validate Before Saving

3. Handle All Precision Levels

4. Use Normalization for Consistency

Common Patterns

Age Calculation with Fuzzy Dates

Display Formatting

Next Steps