ドア通過のカード占いを扱うプロジェクトを書いています。システムは、スワイプされたカードが特定の時間に特定のドアへのアクセス許可を持っているかどうかを確認する必要があります。たとえば、一部のカードは、週末または8〜20時間の勤務時間外に許可がありません。Joda-Timeでそのようなことをプログラムするにはどうすればよいですか?
今私は持っています:
//The code below that I have only checks for within a given date and time range.
DateTime start = new DateTime(2012, 1, 1, 0, 0);
DateTime end = new DateTime(2012, 12, 31, 0, 0);
Interval interval = new Interval(start, end);
boolean DateTimeCheck3 = interval.contains(time); // time is predeclared and gets current time from another class