MCPcopy Index your code
hub / github.com/asg017/sqlite-jiff

github.com/asg017/sqlite-jiff @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
89 symbols 155 edges 10 files 0 documented · 0%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

sqlite-jiff

Work-in-progress date-time SQLite extension that will support timezones, complex durations, and daylight savings calculations, based on the jiff library.

.load ./jiff0

select jiff_duration(
  '2024-11-02T01:59:59[America/Los_Angeles]',
  '2024-11-02T02:00:01[America/New_York]',
  'minutes'
) as result;
/*
┌──────────────────┐
│      result      │
├──────────────────┤
│ 179.966666666667 │
└──────────────────┘
*/

select jiff_duration(
  '2024-11-03T01:59:59[America/Los_Angeles]',
  '2024-11-03T02:00:01[America/New_York]',
  'minutes'
) as result;
/*
┌──────────────────┐
│      result      │
├──────────────────┤
│ 119.966666666667 │
└──────────────────┘
*/

Note that in this example, 2024-11-03 at 2AM is Daylight Savings "fall back", which results in a 2hr difference instead of the "normal" 3hr difference.

Mostly a "this can work" project, not usable for most people.

If there's a feature or use-case that you think would be interesting in this extension, feel free to file an issue! I personally won't work much on this extension until sqlite-vec is out.

Core symbols most depended-on inside this repo

result_span
called by 12
src/span.rs
date_from_value
called by 12
src/date.rs
time_from_value
called by 8
src/time.rs
unit_from_value
called by 7
src/span.rs
register
called by 6
src/span.rs
datetime_from_value
called by 6
src/datetime.rs
jiff_zoned_from_value
called by 6
src/zoned.rs
timestamp_from_value
called by 5
src/timestamp.rs

Shape

Function 61
Method 20
Class 5
Enum 3

Languages

Rust100%

Modules by API surface

src/timezone_transitions.rs17 symbols
src/jiff_datetime_series.rs14 symbols
src/date.rs14 symbols
src/zoned.rs10 symbols
src/span.rs10 symbols
src/time.rs9 symbols
src/timestamp.rs6 symbols
src/datetime.rs5 symbols
src/lib.rs3 symbols
build.rs1 symbols

For agents

$ claude mcp add sqlite-jiff \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact