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

Small datetime helpers extracted from the SciTeX ecosystem as a standalone package.

Install

pip install scitex-datetime

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".

License

AGPL-3.0-only (see LICENSE).

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.1.tar.gz (20.1 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.1-py3-none-any.whl (19.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: scitex_datetime-0.1.1.tar.gz
  • Upload date:
  • Size: 20.1 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.1.tar.gz
Algorithm Hash digest
SHA256 9ab38c2f70c1484923afe4be86814b1527231bd5a79e65baa3551accaa484e60
MD5 3490a244959482368c70ca6e5bbb4e2a
BLAKE2b-256 0a6ffc559934db33cc24cd8cb2a801fa7d971c4a9e26686c7425cf4713c27028

See more details on using hashes here.

Provenance

The following attestation bundles were made for scitex_datetime-0.1.1.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.1-py3-none-any.whl.

File metadata

  • Download URL: scitex_datetime-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 19.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for scitex_datetime-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 50f7c532afb8a00d57e10c57b44fe9c845e7528fa76ec29a700a7a16122da6db
MD5 63e93571a7162d5b350e5edabaa7d5ca
BLAKE2b-256 d58eb98753986d166295aa0bf2d87ccc78d17564fee841f05465e051489ad3db

See more details on using hashes here.

Provenance

The following attestation bundles were made for scitex_datetime-0.1.1-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