Lemmy.VG
  • Communities
  • Create Post
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
cm0002@lemmy.world to Programmer Humor@programming.dev · 1 year ago

I'm new to using Ruby and this tickled me pink

lemmy.ml

message-square
71
link
fedilink
  • cross-posted to:
  • [email protected]
467

I'm new to using Ruby and this tickled me pink

lemmy.ml

cm0002@lemmy.world to Programmer Humor@programming.dev · 1 year ago
message-square
71
link
fedilink
  • cross-posted to:
  • [email protected]
  • Err(()).unwrap()@lemmy.world
    link
    fedilink
    arrow-up
    27
    ·
    1 year ago

    timedelta marks time in days, seconds, and microseconds. It doesn’t take leap years into account because the concept of years is irrelevant to timedelta. If you need to account for leap years, you need a different API.

    • nilloc@discuss.tchncs.de
      link
      fedilink
      English
      arrow-up
      2
      ·
      1 year ago

      365.25*10 would at least get you closer.

    • Randelung@lemmy.world
      link
      fedilink
      arrow-up
      1
      ·
      1 year ago

      You can subtract two dates and get the exact time difference.

Programmer Humor@programming.dev

programmer_humor@programming.dev

Subscribe from Remote Instance

Create a post
You are not logged in. However you can subscribe from another Fediverse account, for example Lemmy or Mastodon. To do this, paste the following into the search field of your instance: [email protected]

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

  • Keep content in english
  • No advertisements
  • Posts must be related to programming or programmer topics
Visibility: Public
globe

This community can be federated to other instances and be posted/commented in by their users.

  • 1.51K users / day
  • 3.52K users / week
  • 7.22K users / month
  • 16.5K users / 6 months
  • 12 local subscribers
  • 33.1K subscribers
  • 2.25K Posts
  • 74.6K Comments
  • Modlog
  • mods:
  • Feyter@programming.dev
  • adr1an@programming.dev
  • BurningTurtle@programming.dev
  • Pierre-Yves Lapersonne@programming.dev
  • BE: 0.19.19
  • Modlog
  • Legal
  • Instances
  • Docs
  • Code
  • join-lemmy.org