`Timex.from_now` rounds up to minute after 45 seconds

オープン
#729 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
55/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
停滞
技術スタック
elixir
領域
backend

調査の方向性

ドキュメント化されている Timex.from_now の2つの呼び出しを再現し、その後、関数の実装と45秒の境界付近における既存の動作を確認してください。46秒のケースが "in 46 seconds" を返し、45秒のケースが引き続き "in 45 seconds" を返し、この境界に対するリグレッションテストのカバレッジがあることをもって完了とします。

索引モデルが issue の本文から書いたものです。

説明

Steps to reproduce
now = ~U[2022-12-15 03:59:00.529722Z]
expires_at = ~U[2022-12-15 03:59:45.529722Z]
Timex.from_now(expires_at, now)
    # => "in 45 seconds"

now = ~U[2022-12-15 03:59:00.529722Z]
expires_at = ~U[2022-12-15 03:59:46.529722Z]
Timex.from_now(expires_at, now)
    # => "in 1 minute"
Description of issue
  • What are the expected results?

    • Returns in 46 seconds
  • If you are certain this is a bug in Timex, do you have references I
    can use to check the algorithm/logic against? For instance, a well-established
    date/time library in another language, a paper, test suite, etc. It is by no
    means a requirement, but is immensely helpful in fixing bugs, and provides me
    extra data to use when building out the test suite

主要言語
Elixir
スター
1.8k
フォーク
408
平均マージ
2時間 8分
マージ済み PR(30日)
1

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

bitwalker/timex のほかの issue

bitwalker/timex の issue をすべて見る

似ている issue

Elixir の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。