git404hub

what is now fr?

jinzhu/now — explained in plain English

Analysis updated 2026-06-26

4,687GoAudience · developerComplexity · 1/5LicenseSetup · easy

tl;dr

A tiny Go library that makes it easy to get the start or end of any time period, day, week, month, quarter, or year, from any given moment, plus a flexible parser for partial date strings.

vibe map

mindmap
  root((now))
    What it does
      Time period boundaries
      Date string parsing
    Time periods
      Day start and end
      Week with config
      Month quarter year
    Features
      Custom week start day
      Custom parse formats
    Use cases
      Date range queries
      Reports and analytics

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

what do people make with this?

VIBE 1

Get the first or last second of the current month to build date-range filters for database queries.

VIBE 2

Find the start of the current week with a configurable weekday (Sunday or Monday).

VIBE 3

Parse partial date strings like '2024' or '2024-03' into full timestamps to handle user date input.

VIBE 4

Calculate time period boundaries for analytics dashboards or scheduled reports in Go.

what's the stack?

Go

how it stacks up fr

jinzhu/nowdkron-io/dkronshomali11/go-interview
Stars4,6874,6874,686
LanguageGoGoGo
Setup difficultyeasymoderateeasy
Complexity1/54/51/5
Audiencedeveloperops devopsdeveloper

Figures from each repo's GitHub metadata at analysis time.

how do i run it?

Difficulty · easy time til it works · 5min
Use freely for any purpose, including commercial use, as long as you keep the copyright notice.

in plain english

Now is a small Go library for working with dates and times. Its main purpose is to make it easy to find the start or end of a time period relative to any given moment. Instead of calculating these boundaries by hand, a developer calls a single function and gets back the exact timestamp they need. The library answers questions like: what was the first moment of this day, week, month, quarter, or year, and what was the last moment of each? It works either from the current time or from any arbitrary time you supply. For week calculations, the start day defaults to Sunday but can be changed to Monday or any other day through a configuration setting. It also includes a flexible string parser that converts partial date strings into full timestamps. Passing in just a year returns the first second of that year, passing in a year and month returns the first second of that month, and passing in just a time like "14" returns that hour on the current day. The parser handles a range of common formats and can be extended with custom formats by adding to its list. The library is written by the same author as GORM, a widely used Go database library, and follows the same style of small, focused utility code. Adding it to a Go project is a one-line install command, and the API is a thin wrapper around Go's standard time package rather than a replacement for it. The README is brief and consists almost entirely of code examples showing inputs and outputs. The library is released under the MIT license.

prompts (copy fr)

prompt 1
Using the jinzhu/now Go library, write a function that returns all database records from the current month by computing the start and end timestamps.
prompt 2
Show me how to configure jinzhu/now to treat Monday as the start of the week instead of Sunday.
prompt 3
How do I use jinzhu/now to parse a partial date string like '2024-03' into a full time.Time value in Go?
prompt 4
Write a Go function using jinzhu/now that returns the first and last second of the current quarter.

Frequently asked questions

what is now fr?

A tiny Go library that makes it easy to get the start or end of any time period, day, week, month, quarter, or year, from any given moment, plus a flexible parser for partial date strings.

What language is now written in?

Mainly Go. The stack also includes Go.

What license does now use?

Use freely for any purpose, including commercial use, as long as you keep the copyright notice.

How hard is now to set up?

Setup difficulty is rated easy, with roughly 5min to a first successful run.

Who is now for?

Mainly developer.

peek the repo → explain another one

This repo across BitVibe Labs

double-check against the repo, no cap.