All Questions
41
questions
0
votes
1
answer
429
views
how to set title formatter in prolificinteractive material-calendarview in kotlin
i'm using this method to set my title format but when i click on next arrow button month and year not change, sep,2022 not change
<com.prolificinteractive.materialcalendarview....
0
votes
2
answers
218
views
Java Calendar/SimpleDateFormat giving invalid date [duplicate]
I am fairly new to java and I am creating a fitness application.
Context: Database should add a new date entry every day the app is opened
Problem: Opened the app yesterday and it successfully added ...
0
votes
3
answers
259
views
Android default method to get date and times properly for 1 day and 1 hour
I have written if-else conditions for displaying date and time when it comes to 1 day, 1 hour, etc. I want to know whether there are any functions that would do that without adding these conditions. I ...
0
votes
1
answer
322
views
Calendar won't return date with AM/PM
I want the date in AM/PM format. Examples suggest to use a SimpleDateFormat with a or aa but this is simply not working for me.
First I set the day. Then I set view to visible for start time.
Result ...
1
vote
2
answers
2k
views
Returning Calendar with SimpleDateFormat
I want to return the value of the calendar + 14 months using the SimpleDateFormat but am getting the below error.
private fun bestBeforeDate(cal: Calendar = Calendar.getInstance()): String
{
...
0
votes
1
answer
121
views
Display dates from DatePickerDialog more easier
Now display the date as follows:
val calendar = Calendar.getInstance()
val currentYear = calendar.get(Calendar.YEAR)
val currentMonth = calendar.get(Calendar.MONTH)
val currentDay = ...
0
votes
0
answers
170
views
How can i add / subtract two Calendar Object in Android Studio
So i'm new to Android development. I've been working on this small software called Tombstone calculator. the user suppose to type in three information. either two information will be used to fill in ...
0
votes
2
answers
914
views
How to display time adding 30mins from current time
I just want it to be displayed from current time adding 30mins till day ends
Ex-Today time is 09:46AM
It should display like 10:00AM,10:30AM,11:00AM....11:30PM for that particular date.
But here in my ...
1
vote
2
answers
588
views
get empty string when Display name of day in Arabic using SimpleDateFormat and UmmalquraCalendar
I want to get the name of the day in Arabic from Date using SimpleDateFormat and UmmalquraCalendar by applying the pattern.
Locale ar = new Locale("ar");
SimpleDateFormat dateFormat = new ...
0
votes
0
answers
28
views
calendar activity with function finish()
In my application I have an activity that contains the calendar. When I select a date, I need to stay in memory and go back to the previous activity. If I use the finish () function it does not make ...
0
votes
3
answers
181
views
Why does formatting today’s date in Android Studio give 19700101?
Here's my code:
import java.util.Date;
import java.text.SimpleDateFormat;
import java.util.GregorianCalendar;
import java.util.Calendar;
public class MainActivity extends AppCompatActivity {
public ...
0
votes
3
answers
1k
views
Calendar get time issue
I have a small application which simply sets the time and date of a Calendar and then retrieves it.
Currently when using my application on devices up to API24 its retrieves the correct date which ...
1
vote
1
answer
292
views
Getting 4 hours difference while getting while converting data in to device timezone?
I am getting the 4 hours difference on time zone from below lines of code on my device:
I am getting the time in such a way like 2018-09-30T13:45:00Z
My start and End Date is as follow: -
"...
2
votes
2
answers
6k
views
How can I Convert Calendar.toString() into date using SimpleDateFormat.parse()?
I'm developing an Android app that uses a database, every time that the user insert a new register the current data and time is save in the db using
Calendar cal = Calendar.getInstance();
So, When I ...
0
votes
4
answers
4k
views
Generate string of yesterday’s date-time in ISO 8601 format
In Android, I am using java.util.Calendar to get yesterday date in format yyyy-MM-dd'T'hh:mm:ss'Z'. For example if today is 31 May 2017, I want to get yesterday date as 2017-05-30T00:00:00Z.
Calendar ...