This logic should work until the format changes in 2099 or so unless it's just 
allowed to roll over in which case it will still work.You just need to get the 
current yymm instead of a "saved" date.If the yymm changes that will allow you 
to track any idle period correctly.

#include <stdio.h>#include <stdlib.h>
int main(int nargs, char *argv[]){  int yymmsave = 0;  char buf[256];
  FILE *fp = fopen(argv[1], "r");  if (fp == NULL)  {    perror(argv[1]);    
exit(1);  }
  while (fgets(buf, sizeof(buf), fp))  {    int yymm, dd, time;    int n = 
sscanf(buf, "%4d%2d_%6d", &yymm, &dd, &time);
    if (n == 3 && yymm != yymmsave)    {      printf("%04d\n", yymm);      
yymmsave = yymm;    }  }
  fclose(fp);}
de Mike W9MDB







 

    On Saturday, June 29, 2019, 11:32:47 PM CDT, Dan Malcolm 
<k4...@outlook.com> wrote:  
 
 
I’m thinking that if I know I’m in year ‘19’ and the month changes from ’02 to 
GT ‘02’ then I can count that as a month change.  Not likely but I can envision 
where I wounn’t be on the air for a month or more.
 
  
 
__________
 
Dan – K4SHQ
 
  
 
From: Black Michael via wsjt-devel [mailto:wsjt-devel@lists.sourceforge.net]
Sent: Saturday, June 29, 2019 10:39 PM
To: wsjtx-devel <wsjt-devel@lists.sourceforge.net>
Cc: Black Michael <mdblac...@yahoo.com>
Subject: Re: [wsjt-devel] ALL.TXT (again)
 
  
 
There's nothing special about the month rollover
 
  
 
The format is YYMMDD so here's the Feb-Mar rollover in my file for example.
 
  
 
190228_235945    14.074 Rx FT8     -3  0.9 2255 WB4HMA HC2AO -11
 
190301_000000    14.074 Rx FT8    -13  0.9 2598 VE1DBM LU1JAO -08
 
  
 
de Mike W9MDB
 
  
 
  
 
On Saturday, June 29, 2019, 09:35:19 PM CDT, Dan Malcolm <k4...@outlook.com> 
wrote:
 
  
 
  
 
I am aware that ALL.TXT data formatting changed in late February this year.  I 
am trying to write a PHP program to split All.TXT in monthly text files.  I 
have program that does this for 2018, but it only finds January and February of 
2019.  The problem is probably a format change. Can anyone help me find the 
first entry of the month format?  Is it YYYYMMDD_”time”? or something similar?
 
 
 
__________
 
Dan – K4SHQ
 
 
 
_______________________________________________
wsjt-devel mailing list
wsjt-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wsjt-devel
   
_______________________________________________
wsjt-devel mailing list
wsjt-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wsjt-devel

Reply via email to