date_time_functions

package
v6.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 10, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Date_time_stamp

func Date_time_stamp() (string, error)

Date_time_stamp returns a timestamp string formatted via a temporary Java program. It takes no arguments. Java will be installed via Chocolatey if needed.

func Format_now

func Format_now() string

Format_now returns the current time formatted as "2006-01-02 15:04:05"

func Generate_pdb_name_from_timestamp

func Generate_pdb_name_from_timestamp() (string, error)

Generate_pdb_name_from_timestamp returns a dynamic PDB name in the format: pdb_<YYYY>_<MMM>_<DDD>_<HHH>_<MMM>_<SSS>

Example:

pdb_2025_007_031_017_020_008

func Generate_prefixed_timestamp

func Generate_prefixed_timestamp(prefix string) (string, error)

Generate_prefixed_timestamp returns "<prefix>_YYYY_MMM_DDD_HHH_MMM_SSS_NNNNNNNNN_TimeZone_ISOYEAR_WWWW_WEEKDAY_YYYY_DOY". It reuses Get_timestamp() for the core, ensuring identical formatting and TZ handling.

func Get_dash_separated_timestamp

func Get_dash_separated_timestamp() (string, error)

Get_dash_separated_timestamp returns a dash-delimited, TZ-aware, nanosecond-precision stamp like: 2025-008-005-020-058-035-258752600-America-slash-New-York-2025-W032-002-2025-217

func Get_timestamp

func Get_timestamp() (string, error)

Get_timestamp returns an underscore-delimited, timezone-aware, nanosecond-precision timestamp string, formatted as: YYYY_MMM_DDD_HHH_MMM_SSS_NNNNNNNNN_TimeZone_ISOYEAR_WWWW_WEEKDAY_YYYY_DOY_UnixSeconds_Nanoseconds

Example: 2025_008_004_014_017_048_822529300_America_slash_New_York_2025_W032_001_2025_216_1754681668_822529300

func Safe_time_stamp

func Safe_time_stamp(timestamp string, mode int) string

Safe_time_stamp optionally replaces "/" with " slash " if mode == 1.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL