The date is represented as, for example, "BET 1 JAN 1852 AND 31 DEC 1852".
I decided to try using DeepSeek neural network.
The task was to parse a date and date range using the B4A language.
Conditions:
The year of the date contains 4 digits. To calculate the number of digits, leading zeros should not be counted.
The month name must be one of the 3 specified Latin characters in uppercase.
The day of the date must be from 1 to 31. Leap years must be taken into account.
The date may have prefixes.
For a single date: ABT, CAL, EST, AFT, BEF, FROM.
For the first date of the date range: ABT, CAL, EST, AFT, BEF, BET, FROM.
For the second date of the date range: TO, AND.
The BET prefix of the first date must be used with the AND prefix of the second date.
The FROM prefix of the first date must be used with the TO prefix of the second date.
For each date, five string values must be returned: prefix, day, month, year, and the parsing success result. If any value is missing, a blank is returned.
The problem was almost completely solved in the few hours it took me to clarify the requirements and test the code.
I received the parser and activity codes with comments in the native language.
Ultimately, the AI was unable to correctly attribute the parsing error of the second date prefix to the second date, assigning it to the first date in the range.
If you are interested in the resulting code, let me know, and I'll post it.
I decided to try using DeepSeek neural network.
The task was to parse a date and date range using the B4A language.
Conditions:
The year of the date contains 4 digits. To calculate the number of digits, leading zeros should not be counted.
The month name must be one of the 3 specified Latin characters in uppercase.
The day of the date must be from 1 to 31. Leap years must be taken into account.
The date may have prefixes.
For a single date: ABT, CAL, EST, AFT, BEF, FROM.
For the first date of the date range: ABT, CAL, EST, AFT, BEF, BET, FROM.
For the second date of the date range: TO, AND.
The BET prefix of the first date must be used with the AND prefix of the second date.
The FROM prefix of the first date must be used with the TO prefix of the second date.
For each date, five string values must be returned: prefix, day, month, year, and the parsing success result. If any value is missing, a blank is returned.
The problem was almost completely solved in the few hours it took me to clarify the requirements and test the code.
I received the parser and activity codes with comments in the native language.
Ultimately, the AI was unable to correctly attribute the parsing error of the second date prefix to the second date, assigning it to the first date in the range.
If you are interested in the resulting code, let me know, and I'll post it.