I Want days and months name view extension

Example :

This is my birthday date 11/07/1997

I want get the number of month and show their name

Month is 07 = July
&
Day is 11 = Thersday

String[] numbers = "11/07/1997".split("/");
String day = numbers[0];
String month = numbers[1];
String year = numbers[2];
StringBuilder newDate = new StringBuilder();

if (day == "11") {
  newDate.append("Thursday in ");
}

if (month == "07") {
  newDate.append("July in ");
}

newDate.append(year);

return newDate.toString();

You will need to create an array of days in months, months, and years because every year, dates fall on a different day. This is just an example type thing. You might be able to use https://stackoverflow.com/a/36290598

2 Likes

Why do you need an extension for that? I started a discussion on the app inventor community that a lot of users these days think that extensions are the holy grail of a builder. Why not learn how to make it in blocks?

5 Likes

what about using the Clock component and its MonthName and WeekdayName method?
https://docs.kodular.io/components/sensors/clock/#month-name

Taifun

3 Likes

It will get current system time and day month

sorry, I do not understand, what you are talking about…
what did you try?

It would really help if you provided a screenshot of your relevant blocks, so we can see what you are trying to do, and where the problem may be.

To get an image of your blocks, right click in the Blocks Editor and select “Download Blocks as Image”. You might want to use an image editor to crop etc. if required. Then post it here in the community.

Taifun

I want that

Example :

This is my birthday date 11/07/1997

I want get the number of month and show their name

Month is 07 = July
&
Day is 11 = Thersday

Why won’t you try something like this ?

8 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.