Initial Commit only include kotlinx.datetime utils, others will follow.
NOTEs:
- use .toEpochMilliseconds() to convert to Long values
- ALWAYS store dates un UCT
- for this demo I used
pastXDaysUtc(days = 5).toEpochMilliseconds().relativeTimeSpanUtc()
to get a Long TimeDate value - for this demo I used
now()
(kotlinx.datetime.Clock.System.now) for Instant
Instant.dateTimePeriod()
= PT0.000324000SnowToLongSystemDefault()
= 1700058378780currentMoment()
= 2023-11-15T14:26:18.780031ZgetCurrentTimeInSeconds()
= 1700058378currentDayFormatted()
= 2023 NOVEMBER 15currentMomentUtc()
= 2023-11-15T14:26:18.780062ZnowToLongUtc()
= 1700058378780nextMonthUtc()
= 2023-12-01T00:00:00ZfirstDayUtc()
= 2023-11-01T00:00:00ZlastDayUtc()
= 2023-11-30T00:00:00ZdateInUtc()
= 2023-11-15in30DaysUtc()
= 2023-12-15T14:26:18.780031ZinXDaysUtc(days = 20)
= 2023-12-05T14:26:18.780031Zpast15DaysUtc()
= 2023-10-31T14:26:18.780031Zpast60DaysUtc()
= 2023-09-16T14:26:18.780031ZpastXDaysUtc(days = 20)
= 2023-10-26T14:26:18.780031ZLong.relativeTimeSpanUtc()
= 5 days ago
- AppExtensions - a collection of Extension functions
- AppFileUtils - Internal and Media Storage Access, require setup of File Url Authority
- BitmapUtils - Several Bitmap related utilities, converting and decoding etc. see sources
- ContextExt - for Context related Extensions such as Share Intents etc, see [Share Utils] below
- EmailManager - simple regex email validator
- PasswordManager - notably generatePassword() and evaluatePassword() read javadocs
- Resource - Philipp Lackner's Resource Class
- UiText - Philipp Lackner's UiText Class (extended)
- UnitExt - Extension functions to serve Ui unit conversions and formatting
- ValidationUtil - various field input validations call these from ViewModel Events
- VersionCheck - making version checks easier.
- AppBooleanField()
- RowScope.AppBottomNavItem()
- AppDialog()
- AppInfoDialog()
- AppDropDownSelection()
- AppExpandingText()
- AppNavigationIcon()
- AppOptionSelection()
- AppTextField()
- AppToolBar()
- rememberWindowInfo()
These are NOT Share intents but is helpers to those. This part will be expanded soon.
- ShareTo()
- ShareToMailReport()
- ShareToWhatsAppReport()
AppTextField() still has a problem with Leading Icons, it is because if there is no leading Icon it still reserves space in front of the TextField for it. This need to be replaced with a 0.dp sized Icon or sum thing, in progress
P.S. Request more Utilities if you need.
In your root build.gradle.kts
repositories {
mavenCentral()
maven("https://jitpack.io")
}
add the dependency
dependencies {
implementation("com.github.Morons:CryptoCodeAndroidLibrary:1.0.6")
}