Méthode : Tool.shiftDaysNoWeekEnds dans le passé incohérent

Request description

Suspicion anomalie : Pour la méthode public static java.lang.String shiftDaysNoWeekEnds​(java.lang.String d, int n) , si l’on renseigne n en négatif, les weekends ne sont pas retirés dans tous les cas.

Steps to reproduce

This request concerns an up-to-date Simplicité instance
and these are the steps to reproduce it:


		for(int i = 9;i>0;i--)
		{
			AppLog.info("".getClass(),"shiftDaysNoWeekEnds ["+d+"]-"+i , Tool.shiftDaysNoWeekEnds(d,-i), null);
		}
 
		for(int j = 0;j<10;j++)
		{
			AppLog.info("".getClass(),"shiftDaysNoWeekEnds ["+d+"]+"+j , Tool.shiftDaysNoWeekEnds(d,j), null);
		}

Les lignes en gras ne sont pas bonnes et il manque le 28 et le 29 novembre

shiftDaysNoWeekEnds [2023-12-04]+9||Evénement: 2023-12-15
shiftDaysNoWeekEnds [2023-12-04]+8||Evénement: 2023-12-14
shiftDaysNoWeekEnds [2023-12-04]+7||Evénement: 2023-12-13
shiftDaysNoWeekEnds [2023-12-04]+6||Evénement: 2023-12-12
shiftDaysNoWeekEnds [2023-12-04]+5||Evénement: 2023-12-11
shiftDaysNoWeekEnds [2023-12-04]+4||Evénement: 2023-12-08
shiftDaysNoWeekEnds [2023-12-04]+3||Evénement: 2023-12-07
shiftDaysNoWeekEnds [2023-12-04]+2||Evénement: 2023-12-06
shiftDaysNoWeekEnds [2023-12-04]+1||Evénement: 2023-12-05
shiftDaysNoWeekEnds [2023-12-04]+0||Evénement: 2023-12-04
shiftDaysNoWeekEnds [2023-12-04]-1||Evénement: 2023-12-03
shiftDaysNoWeekEnds [2023-12-04]-2||Evénement: 2023-12-02
shiftDaysNoWeekEnds [2023-12-04]-3||Evénement: 2023-12-01
shiftDaysNoWeekEnds [2023-12-04]-4||Evénement: 2023-11-30
shiftDaysNoWeekEnds [2023-12-04]-5||Evénement: 2023-11-27
shiftDaysNoWeekEnds [2023-12-04]-6||Evénement: 2023-11-26
shiftDaysNoWeekEnds [2023-12-04]-7||Evénement: 2023-11-25
shiftDaysNoWeekEnds [2023-12-04]-8||Evénement: 2023-11-24
shiftDaysNoWeekEnds [2023-12-04]-9||Evénement: 2023-11-23

Technical information

Instance /health

[Platform]
Status=OK
Version=5.3.23
BuiltOn=2023-11-24 15:38
Git=5.3/b849931f89c40ba4f13af0f3dc9da5761f63381f
Encoding=UTF-8
EndpointIP=127.0.0.1
EndpointURL=http://partenor.simplicite.io:11248
TimeZone=Europe/Paris
SystemDate=2023-12-01 19:07:51

[Application]
ApplicationVersion=1.0.0
ContextPath=
ContextURL=https://demo5.partenor.simplicite.io
ActiveSessions=1
TotalUsers=7
EnabledUsers=5
LastLoginDate=2023-12-01 18:39:22

[Server]
ServerInfo=Apache Tomcat/9.0.83
ServerType=WEB
ServerActiveSessions=1
ServerSessionTimeout=30
CronStarted=true

[OS]
Name=Linux
Architecture=amd64
Version=3.10.0-1160.99.1.el7.x86_64
SystemEncoding=UTF-8

[Disk]
DiskFree=25341
DiskUsable=21184
DiskTotal=100701

[JavaVM]
Version=17.0.1
Vendor=Eclipse Adoptium
VMName=OpenJDK 64-Bit Server VM
VMVersion=17.0.1+12
ScriptEngine=rhino
ScriptEngineVersion=Rhino 1.7.13 2020 09 02
HeapFree=335073
HeapSize=524288
HeapMaxSize=524288
TotalFreeSize=335073

[Cache]
ObjectCache=392
ObjectCacheMax=10000
ObjectCacheRatio=3
ProcessCache=392
ProcessCacheMax=10000
ProcessCacheRatio=3
APIGrantCache=0
APIGrantCacheMax=1000
APIGrantRatio=0

[Database]
Vendor=2
ProductName=MySQL
ProductVersion=5.5.68-MariaDB
DriverName=MySQL Connector/J
DriverVersion=mysql-connector-j-8.2.0 (Revision: 06a1f724497fd81c6a659131fda822c9e5085b6c)
DBDate=2023-12-01 19:07:51
DBDateOffset=0
DBPatchLevel=5;P03;6f1cec3ddb7615b1340daf5a9becaab3
UsingBLOBs=true

[Healthcheck]
Date=2023-12-01 19:07:51
ElapsedTime=9

Simplicité logs
---paste the content of the **relevant** server-side logs---
Browser logs
---paste content of the **relevant** browser-side logs---
Other relevant information

----E.g. type of deployment, browser vendor and version, etc.----

Bonjour,

Ce ne nous dit rien, l’API n’a dû servir qu’avec des nombres positifs jusqu’ici.
On va améliorer l’algorithme.

Ce sera corrigé en 5.3.24

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