mirror of
https://github.com/Kunzisoft/KeePassDX.git
synced 2026-11-30 13:52:58 -08:00
Fix date instant
This commit is contained in:
1 parent
3edfa8a6ce
commit
cdc4ae4fb3
3 files changed
+5
-2
No files matched your search
@@ -74,7 +74,7 @@ class EntryEditFragment: StylishFragment() {
|
||||
|
||||
private var fontInVisibility: Boolean = false
|
||||
private var iconColor: Int = 0
|
||||
private var expiresInstant: DateInstant = DateInstant(Instant.now().plus(Duration.standardDays(30)).toDate())
|
||||
private var expiresInstant: DateInstant = DateInstant.IN_ONE_MONTH
|
||||
|
||||
var drawFactory: IconDrawableFactory? = null
|
||||
var setOnDateClickListener: View.OnClickListener? = null
|
||||
|
||||
@@ -23,6 +23,8 @@ import android.content.res.Resources
|
||||
import android.os.Parcel
|
||||
import android.os.Parcelable
|
||||
import androidx.core.os.ConfigurationCompat
|
||||
import org.joda.time.Duration
|
||||
import org.joda.time.Instant
|
||||
import java.text.SimpleDateFormat
|
||||
import java.util.*
|
||||
|
||||
@@ -95,6 +97,7 @@ class DateInstant : Parcelable {
|
||||
companion object {
|
||||
|
||||
val NEVER_EXPIRE = neverExpire
|
||||
val IN_ONE_MONTH = DateInstant(Instant.now().plus(Duration.standardDays(30)).toDate())
|
||||
private val dateFormat = SimpleDateFormat.getDateTimeInstance()
|
||||
|
||||
private val neverExpire: DateInstant
|
||||
|
||||
@@ -37,7 +37,7 @@ class EntryInfo : Parcelable {
|
||||
var username: String = ""
|
||||
var password: String = ""
|
||||
var expires: Boolean = false
|
||||
var expiryTime: DateInstant = DateInstant.NEVER_EXPIRE
|
||||
var expiryTime: DateInstant = DateInstant.IN_ONE_MONTH
|
||||
var url: String = ""
|
||||
var notes: String = ""
|
||||
var customFields: List<Field> = ArrayList()
|
||||
|
||||
Reference in new issue
Block a user