frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Ask HN: Library that maps clock times to human terms ("early morning", etc.)?

1•MollyRealized•1h ago
I am wondering if people have already done the work on what I'm about to describe. I'm going to try to define what's in my mind by explaining the working circumstance. The humidity part of the below, however, is solved - I'm just trying to explain the kind of substitution I'd like.

For me, temperature doesn't mean as much as stickiness. So I worked out a script that takes the dew point and maps it against a humidity comfort index. I have both the next 24 hours, and the next six days.

Right now, my script reads out the next 24 hours like this:

"From 5-10 AM, it will be pleasant (0). At 11:57 AM, it will be sticky (1). At 12:57 PM, it will be pleasant (0). From 1-10 PM, it will be refreshing (-1). At 11:57 PM, it will be pleasant (0). From 12-4 AM, it will be sticky (1)."

What I'm wondering - before I try to reinvent the wheel - is if there is basically a generalized library or reference that lets you define things using more ambiguous, human terms. I imagine it would have to define not only morning, afternoon, and evening, but also have "early", "mid", and "late" adjectives, as well as overnight.

For example, if this library existed, I could implement it into the script and then it might say:

"This morning, it will be pleasant (0). At noon, it will be sticky (1). The afternoon and night, it will be refreshing (-1). Overnight, it will be sticky (1)."

Comments

markussss•1h ago
There are probably several libraries that offer this functionality, the question is just what your other requirements are. It is also built into most modern web browsers, just check out the MDN for Intl.DateTimeFormat with the dayPeriod option [1].

[1]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...

austin-cheney•1h ago
That should be extremely simple for anyone to write themselves.

How developers are using Apple's local AI models with iOS 26

https://techcrunch.com/2025/09/26/how-developers-are-using-apples-local-ai-models-with-ios-26/
1•mooreds•31s ago•0 comments

The death of east London's most radical bookshop

https://www.the-londoner.co.uk/scarlett-letters-closure-left-wing-bookshop/
1•mooreds•3m ago•0 comments

Meat is a leading emissions source–but few outlets report on it, analysis finds

https://www.theguardian.com/environment/2025/sep/27/meat-gas-emissions-reporting
1•shrubby•4m ago•1 comments

What are popular AI coding benchmarks measuring?

https://blog.nilenso.com/blog/2025/09/25/swe-benchmarks/
1•birdculture•5m ago•0 comments

Onward Ye Christian Soldiers Bucky Fuller Awaits

https://romeviharo.substack.com/p/onward-ye-christian-soldiers-bucky
1•SymbiquityTAP•6m ago•1 comments

Are We in an A.I. Bubble? I Suspect So

https://gideons.substack.com/p/are-we-in-an-ai-bubble-i-suspect
1•paulpauper•9m ago•0 comments

Differentiable Curves for PyTorch

https://github.com/alexshtf/torchcurves
1•alexshtf•12m ago•0 comments

Just-Noticeable Difference

https://en.wikipedia.org/wiki/Just-noticeable_difference
1•downboots•14m ago•0 comments

Bun serves docs to Claude Code as Markdown instead of HTML

https://twitter.com/bunjavascript/status/1971934734940098971
1•tosh•18m ago•0 comments

The Art of the Impersonal Essay

https://www.newyorker.com/magazine/2025/09/29/the-art-of-the-impersonal-essay
1•FromTheArchives•19m ago•0 comments

I made a public living room and the internet keeps putting weirder stuff in it

https://www.theroom.lol
3•streetmeat•19m ago•1 comments

Explosive battery blaze in South Korea 'paralyzes' vital government services

https://www.cnn.com/2025/09/27/asia/south-korea-fire-data-center-daejeon-intl-hnk
2•killing_time•25m ago•0 comments

The Plight of Arctic Indigenous Homelands

https://isonomiaquarterly.com/archive/volume-3-issue-3/darkness-at-noon-2/
2•brandonlc•28m ago•0 comments

Offset Geometric Contact (OGC)

https://graphics.cs.utah.edu/research/projects/ogc/
1•harporoeder•28m ago•1 comments

1.5M PDFs in 25 Minutes

https://zerodha.tech/blog/1-5-million-pdfs-in-25-minutes/
1•Garbage•29m ago•0 comments

A Startup Used AI to Make a Psychedelic Without the Trip

https://www.wired.com/story/a-startup-used-ai-to-make-a-psychedelic-without-the-trip/
1•walterbell•30m ago•0 comments

Simulating a single brain cell [video]

https://www.youtube.com/watch?v=GkiITbgu0V0
1•surprisetalk•31m ago•0 comments

Putting ChatGPT on the Couch

https://www.newyorker.com/culture/the-weekend-essay/putting-chatgpt-on-the-couch
2•koolhead17•31m ago•0 comments

CHERI with a Linux on Top

https://lwn.net/SubscriberLink/1037974/903c6f9a42f7782a/
2•fanf2•36m ago•1 comments

The doctor who says we can improve our vision – at any age

https://www.thetimes.com/life-style/health-fitness/article/how-to-improve-vision-any-age-doctor-a...
3•bookofjoe•39m ago•1 comments

Yangwang U9 Xtreme is fastest production car

https://electrek.co/2025/09/20/yangwang-u9-xtreme-cracks-300-mph-to-become-fastest-production-car...
1•1970-01-01•39m ago•0 comments

Beating spectral bandwidth limits for large aperture broadband nano-optics

https://www.nature.com/articles/s41467-025-58208-4
1•PaulHoule•40m ago•0 comments

David Foster Wallace Tried to Warn Us About These Eight Things

https://www.honest-broker.com/p/david-foster-wallace-tried-to-warn
3•paulpauper•41m ago•2 comments

Review: The Russo-Ukrainian War

https://www.astralcodexten.com/p/your-review-the-russo-ukrainian-war
2•paulpauper•42m ago•0 comments

I'm Marty Stouffer [video]

https://www.youtube.com/watch?v=AhuA1dZHoOU
1•ofalkaed•43m ago•0 comments

Why Apple Has a Big AI Problem [video]

https://www.youtube.com/watch?v=xZD8_imniuo
1•retskrad•43m ago•1 comments

Justice Clarence Thomas says legal precedents are not 'the gospel'

https://abcnews.go.com/Politics/justice-clarence-thomas-legal-precedents-gospel/story?id=125967044
1•throw0101c•43m ago•4 comments

Americans Are Using PTO to Sleep, Not for Vacation–Report

https://www.newsweek.com/americans-are-using-pto-to-sleep-not-for-vacation-report-10783162
17•randycupertino•45m ago•5 comments

Justice Department Seeks Information on Georgia D.A. Who Prosecuted Trump

https://www.nytimes.com/2025/09/26/us/justice-department-fani-willis-trump.html
3•throw0101c•48m ago•2 comments

Scaling Beyond Memory: How Materialize Uses Swap for Larger Workloads

https://materialize.com/blog/scaling-beyond-memory/
1•jitl•52m ago•0 comments