問題タブ [date-comparison]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
regex - 最終更新ファイルの正規表現
フォルダー内の最後に変更されたファイル/最新の更新されたファイルを見つけるための正規表現を手伝ってください。
ファイルは次のようになっています。
正規表現を使用して、ファイルを取得する必要がありますTest.2014_02_25 updated 21:24:23
ありがとう。
php - DateTime diff の間違った DateInterval
私は2つの DateTime を比較しています:
したがって、09:59:31 と $diff->invert == 1 を取得します。これは、負の値であることを意味します。
私はこの問題を見ました:php datetime->diffは間違った時間数を計算しています(3が多すぎます)。同様の問題だと思いますが、->sub()を使い続けるための解決策が見つかりません。何か案は ?
TimeZone の問題である可能性があると思われる場合は、すべての DateTime を確認しましたが、すべての TimeZone が「Europe/Berlin」に設定されているため、ここから来たとは思いません。
ありがとうございました !
ios - iOS detect if date is within last week
I am trying to detect is a specific date is within the last 7 days (within the last week). I have found a method to do that, but its eating my performance in a tableview (chat controller).
The code is posted below, and i know it can be done a LOT better, but i am running out of ideas. Does somebody have better approach? thanks!
The code:
EDIT Thanks to @vikingosegundo i have tried to use his solution to implement this solution. He since then made a category that made it even easier that i will try and implement now. Just for the curious ones:
php - 日付と時間を比較する
最初の 1 つはdateExam (format date)、2 番目はstartTime、3 番目はendTimeとformat (time)の 3 つの属性があります。
それらの属性が現在の日付と時刻の間にある場合は、試験を表示してください。これらの属性をタイムスタンプに変換して比較しようとしましたが、失敗しました
編集 - コードが追加されました
java - 日付比較の混乱
私はdue_date
=を持ってい2014-05-09 11:36:41.816
ます。
今日の日付が と同じであるか、そうでない場合はユーザーがそのメッセージを表示する必要があるかどうかを確認したいdue_date
と1 day less then due_date
思いrenew
ますtoo early to renew
。私が更新しdate 8
た場合、ユーザーは実行できますが、ユーザーが更新した場合date 7
、彼は許可されず、メッセージが表示されます。
私は同じ日の手段をチェックすることを知っていますdate 9
、私は使用することができます:
しかし、計算の1日前に行う方法がわかりません。そのためのガイダンスです。