Skip to main content

Datetime helpers (linspace, normalize_timestamp, format helpers) — standalone module from the SciTeX ecosystem

Project description

scitex-datetime

PyPI Python Tests Install Test Coverage Docs License: AGPL v3

SciTeX

Small datetime helpers — linspace, normalize, parse, format.

Full Documentation · pip install scitex-datetime


Installation

pip install scitex-datetime

Quick Start

import scitex_datetime as sxd

dt = sxd.to_datetime("2026/04/27 10:30:00")
print(sxd.format_for_filename(dt))   # "2026-04-27_103000"

1 Interfaces

Python API
import scitex_datetime as sxd

# Linearly spaced timestamps
sxd.linspace(start, stop, num=100)

# Parse and standardize timestamps
sxd.normalize_timestamp("2026-04-27T10:30:00")
sxd.to_datetime("2026/04/27 10:30:00")
sxd.validate_timestamp_format("2026-04-27 10:30:00")

# Format
sxd.format_for_display(dt)       # "2026-04-27 10:30:00"
sxd.format_for_filename(dt)      # "2026-04-27_103000"

# Time deltas
sxd.get_time_delta_seconds(dt1, dt2)

Status

Standalone fork of scitex.datetime. The umbrella package's scitex.datetime import path is preserved via a sys.modules-alias bridge. STANDARD_FORMAT is read from a scitex CONFIG when available, falling back to "%Y-%m-%d %H:%M:%S".

Part of SciTeX

scitex-datetime is part of SciTeX.

Four Freedoms for Research

  1. The freedom to run your research anywhere — your machine, your terms.
  2. The freedom to study how every step works — from raw data to final manuscript.
  3. The freedom to redistribute your workflows, not just your papers.
  4. The freedom to modify any module and share improvements with the community.

AGPL-3.0 — because we believe research infrastructure deserves the same freedoms as the software it runs on.

License

AGPL-3.0-only (see LICENSE).


SciTeX

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

scitex_datetime-0.1.2.tar.gz (20.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

scitex_datetime-0.1.2-py3-none-any.whl (20.5 kB view details)

Uploaded Python 3

File details

Details for the file scitex_datetime-0.1.2.tar.gz.

File metadata

  • Download URL: scitex_datetime-0.1.2.tar.gz
  • Upload date:
  • Size: 20.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for scitex_datetime-0.1.2.tar.gz
Algorithm Hash digest
SHA256 72abf16b8eefe55ebe1bb57eeabf52a1ba811fe56458a4148588768e05786ba4
MD5 23e5f4570c87f078c62e5768cea1421a
BLAKE2b-256 c80a564130ffb40299b91848a6f97fb7e5c666bfc87971837b6131d26fd7b33a

See more details on using hashes here.

Provenance

The following attestation bundles were made for scitex_datetime-0.1.2.tar.gz:

Publisher: publish-pypi.yml on ywatanabe1989/scitex-datetime

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file scitex_datetime-0.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for scitex_datetime-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 4da53602b642de2be501a2fcbf966509d8a7d9c6972b70532b2e91dfb172bec7
MD5 b1c8b759c9b6f5b47b547acc260f03e3
BLAKE2b-256 f79265dff15f667f06f92fef01bed4875b8bad7d5f4e8589aa176f026272e06e

See more details on using hashes here.

Provenance

The following attestation bundles were made for scitex_datetime-0.1.2-py3-none-any.whl:

Publisher: publish-pypi.yml on ywatanabe1989/scitex-datetime

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page