make following modifications, these useless functions can be hide.

```
#ifndef __HSL_ExpirationTimeCalc_hsl__
#define __HSL_ExpirationTimeCalc_hsl__ 1
namespace ExpirationTimeCalc
{
#ifndef HSL_RUNTIME
function DasyBetween(string d1, string d2) variable;
#endif
#ifdef HSL_RUNTIME
function DaysInMonth(variable y, variable m) variable
{
if(m==1 || m==3 || m==5 || m==7 || m==8 || m==10 || m==12) return(31);
if(m==2){
if(y%4==0 && y%100!=0) return (29);
if(y%400==0) return (29);
return (28);
}
return (30);
}
function CompareDate(variable y, variable m, variable d, variable y1, variable m1, variable d1) variable{
if(y>y1) return(1); if(y<y1) return(-1);
if(m>m1) return(1); if(m<m1) return(-1);
if(d>d1) return(1); if(d<d1) return(-1);
return(0);
}
function DasyBetween(string d1, string d2) variable{
variable days(0);
variable cp(0);
variable y,m,d,cy,cm,cd,i,j;
y=IVal(d1.Mid(0,4));
m=IVal(d1.Mid(4,2));
d=IVal(d1.Mid(6,2));
cy=IVal(d2.Mid(0,4));
cm=IVal(d2.Mid(4,2));
cd=IVal(d2.Mid(6,2));
cp=CompareDate(y,m,d, cy, cm, cd);
if(cp==0) return (0);
if(cp<0){
for(i=y;i<=cy;i++){
for(j=1;j<=12;j++){
if((i==y && j<m) || (i==cy && j>cm)) days=days+0;
else if(i==y && j==m && i==cy && j==cm) days=days+cd-d;
else if(i==y && j==m) days=days+DaysInMonth(i,j)-d;
else if(i==cy && j==cm) days=days+cd;
else days=days+DaysInMonth(i,j);
}
}
return(days);
}
else{
for(i=cy;i<=y;i++){
for(j=1;j<=12;j++){
if((i==cy && j<cm) || (i==y && j>m)) days=days+0;
else if(i==cy && j==cm && i==y && j==m) days=days+d-cd;
else if(i==cy && j==cm) days=days+DaysInMonth(i,j)-cd;
else if(i==y && j==m) days=days+d;
else days=days+DaysInMonth(i,j);
}
}
return(-days);
}
}
#endif
}
#endif
```

hsl is too old, and it lacks too many features of modern programming languages. If we do it in C#, two line code is enough.

```
string barcode = "20240105";
var offset = (DateTime.Now - new DateTime(int.Parse(barcode.Substring(0,4)),
int.Parse(barcode.Substring(4,2)),
int.Parse(barcode.Substring(6,2)))).Days;
```