Skip to main content

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

Project description

scitex-datetime

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.0.tar.gz (18.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.0-py3-none-any.whl (18.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: scitex_datetime-0.1.0.tar.gz
  • Upload date:
  • Size: 18.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.12

File hashes

Hashes for scitex_datetime-0.1.0.tar.gz
Algorithm Hash digest
SHA256 d54d918f5d783d82cb9899334fdde33d7fa351bbdd823a0a20aadf4609639f49
MD5 f1a3af90b303551eaa4b4123012b6e9a
BLAKE2b-256 882b37d24528f2d8aca1e6490e45c6f21bce31b57b8c37374a307c49d713f330

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for scitex_datetime-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 57bda9b40fe0be6b726356078fffc2dc093614a09a51728619be7e18a6cf3849
MD5 1eada7218c6b68e744a34170ff71269c
BLAKE2b-256 b2f03477fd5d46e64f479687c7b5bde79dc399069568cef48da478e1971386bd

See more details on using hashes here.

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