TimeOfDay

package module
v0.0.0-...-4a1cc3f Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2024 License: BSD-2-Clause Imports: 1 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

TimeOfDay

Модуль занимается исключительно тем что принимает текущие время и делает чисто алгоритмически вывод какое время суток День/Ночь AM/PM День/Вечер/Ночь/Утро. Делается исключительно для того чтобы подмешивать в промпты GPТ кроме текущего времени еще и честь. Для того чтоб например ассистент говорил "Добрый вечер" не напрягая своих мозгов искючительно из system prompt

Установка

go get github.com/saintbyte/TimeOfDay

Документация

Модуль состоит из одной фукнции Parse и структуры TimeOfDay Функция Parse принимает на вход time.Time и возращает TimeOfDay TimeOfDay содержит:

  • PartOfDay1 - День или ночь . Соотвественно константы Day и Night
  • AmOrPM - PM или AM. Соотвественно константы Am и Pm
  • PartOfDay2 - Более точно определение части суток: День или ночь или после полудня, вечер , ночь . Константы: Morning,Afternoon,Evening, Night

Подробнее: https://pkg.go.dev/github.com/saintbyte/TimeOfDay

Documentation

Overview

Модуль занимается исключительно тем что принимает текущие время и делает чисто алгоритмически вывод какое время суток День/Ночь AM/PM День/Вечер/Ночь/Утро. Делается исключительно для того чтобы подмешивать в промпты GPТ кроме текущего времени еще и честь. Для того чтоб например ассистент говорил "Добрый вечер" не напрягая своих мозгов искючительно из system prompt

Index

Constants

View Source
const (
	AM        = "AM"
	PM        = "PM"
	Day       = "day"
	Morning   = "morning"
	Afternoon = "afternoon"
	Evening   = "evening"
	Night     = "night"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type TimeOfDay

type TimeOfDay struct {
	PartOfDay1 string // День или ночь
	AmOrPM     string // AM или PM
	PartOfDay2 string // День или ночь или после полудня, вечер , ночь
}

func Parse

func Parse(inputTime time.Time) TimeOfDay

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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