{"repo":"frectonz/pg-when","free":true,"listed":false,"github":"https://github.com/frectonz/pg-when","clone":"git clone https://github.com/frectonz/pg-when.git","description":"Just say when.","language":"Rust","stars":45,"topics":["date-parsing","datetime","natural-language-processing","parser","pgrx","postgres","postgresql","postgresql-extension","rust","rust-lang"],"license":"MIT","category":"databases-storage","readme_excerpt":"pg-when A PostgreSQL extension for creating time values with natural language. Example 1: Relative Past in a Specific Timezone Gets the timestamp for the beginning of the current hour, but 5 days ago, in the Asia/Tokyo timezone. Example 2: Future Weekday with AM/PM Finds the time for next Friday at 8:00 PM in the America/New York timezone. Example 3: Future Relative Date with a UTC Offset Calculates the timestamp for exactly 2 months from now, at midnight, in the UTC-8 timezone. Example 4: Specific Time During the Previous Week Gets the timestamp for last Monday at a specific 24-hour time: 22:30 (10:30 PM). Example 5: Specific Date with a Time Keyword Gets the timestamp for the evening (6 PM) on a specific date, New Year's Eve 2026. This shows how an exact date can be combined with a relative time keyword. Query Combinations A pg-when query has up to three components: a date , a time , and a timezone . These components can be combined in several ways, connected by the keywords at and in . All of the following are valid. NOTE: If a timezone is not provided, the system defaults to UTC. Component Details A date can be either relative or exact . Relative Date Describes a date in relation to the present. - Keywords : today , yesterday , tomorrow - Phrases : next week , last month , this friday , 5 days ago , in 2 years Exact Date Specifies a calendar date. - YYYY-MM-DD , YYYY/MM/DD (e.g. 2004-10-10 , 2004/10/10 ) - DD-MM-YYYY , DD/MM/YYYY (e.g. 10-10-2004 , 10/10/2004 ) - Month D,","default_branch":null,"files":null,"tree":[],"storefront":"/r/frectonz","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/frectonz/pg-when/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}