Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #38305 > unrolled thread
| Started by | siddareddy.moolam@gmail.com |
|---|---|
| First post | 2018-05-31 03:07 -0700 |
| Last post | 2018-06-01 16:08 +0200 |
| Articles | 13 — 5 participants |
Back to article view | Back to comp.lang.java.programmer
I need to get files with different timespan 1hr, 1day.1 week siddareddy.moolam@gmail.com - 2018-05-31 03:07 -0700
Re: I need to get files with different timespan 1hr, 1day.1 week Eric Sosman <esosman@comcast-dot-net.invalid> - 2018-05-31 07:47 -0400
Re: I need to get files with different timespan 1hr, 1day.1 week siddareddy.moolam@gmail.com - 2018-05-31 05:59 -0700
Re: I need to get files with different timespan 1hr, 1day.1 week Eric Douglas <e.d.programmer@gmail.com> - 2018-05-31 06:52 -0700
Re: I need to get files with different timespan 1hr, 1day.1 week Daniele Futtorovic <da.futt.news@laposte-dot-net.invalid> - 2018-05-31 15:53 +0200
Re: I need to get files with different timespan 1hr, 1day.1 week Eric Sosman <esosman@comcast-dot-net.invalid> - 2018-05-31 10:08 -0400
Re: I need to get files with different timespan 1hr, 1day.1 week msr2858@gmail.com - 2018-05-31 22:02 -0700
Re: I need to get files with different timespan 1hr, 1day.1 week msr2858@gmail.com - 2018-05-31 22:08 -0700
Re: I need to get files with different timespan 1hr, 1day.1 week Eric Sosman <esosman@comcast-dot-net.invalid> - 2018-06-01 07:43 -0400
Re: I need to get files with different timespan 1hr, 1day.1 week msr2858@gmail.com - 2018-06-01 04:57 -0700
Re: I need to get files with different timespan 1hr, 1day.1 week msr2858@gmail.com - 2018-06-01 04:58 -0700
Re: I need to get files with different timespan 1hr, 1day.1 week msr2858@gmail.com - 2018-06-01 05:00 -0700
Re: I need to get files with different timespan 1hr, 1day.1 week Daniele Futtorovic <da.futt.news@laposte-dot-net.invalid> - 2018-06-01 16:08 +0200
| From | siddareddy.moolam@gmail.com |
|---|---|
| Date | 2018-05-31 03:07 -0700 |
| Subject | I need to get files with different timespan 1hr, 1day.1 week |
| Message-ID | <a8a31edc-333e-48fd-a7e0-34f38c9e0d5d@googlegroups.com> |
i have a folder with different files with different dates i need to get if one hour file is there or not,need to display file name after that 1 day file need to displayed after 1 week file name should be displayed .. Ex: 31-05-2018 folder inside filename is like these : 31-05-2018_10-42-25_rakesh_hike_load_608_output.txt if i need to enter 1 day details i need to display that file
[toc] | [next] | [standalone]
| From | Eric Sosman <esosman@comcast-dot-net.invalid> |
|---|---|
| Date | 2018-05-31 07:47 -0400 |
| Message-ID | <peond1$3ai$1@dont-email.me> |
| In reply to | #38305 |
On 5/31/2018 6:07 AM, siddareddy.moolam@gmail.com wrote:
> i have a folder with different files with different dates i need to get if one hour file is there or not,need to display file name
> after that 1 day file need to displayed
>
> after 1 week file name should be displayed ..
> Ex:
>
> 31-05-2018 folder inside filename is like these : 31-05-2018_10-42-25_rakesh_hike_load_608_output.txt if i need to enter 1 day details i need to display that file
What difficulty are you having? Here are a few hints
about possible solution steps:
- To inspect the names of files and folders contained in
another folder, start with a File object representing the
container and use its list() or listFiles() method:
File folder = new File("C:\\Users\\siddareddy\\folder");
for (String name : folder.list())
System.out.println(name);
// ... or ...
for (File child : folder.listFiles())
System.out.println(child);
- To convert the first part of a file name to a time stamp
(so you can easily compare it to "Yesterday" or "Last week"),
first separate the date-and-time portion from the rest:
String name
= "31-05-2018_10-42-25_rakesh_hike_load_608_output.txt";
String prefix = "31-05-2018_10-42-25";
... then use a SimpleDateFormat to parse the prefix:
DateFormat format = new SimpleDateFormat("dd-MM-yy_HH-mm-ss");
Date stamp = format.parse(prefix);
If this doesn't help you get started, please tell us more about
the problems you are facing.
--
esosman@comcast-dot-net.invalid
Nine hundred sixty-five days to go.
[toc] | [prev] | [next] | [standalone]
| From | siddareddy.moolam@gmail.com |
|---|---|
| Date | 2018-05-31 05:59 -0700 |
| Message-ID | <6ba6236b-78bd-4224-a7be-a0dcb28e1a9a@googlegroups.com> |
| In reply to | #38307 |
On Thursday, May 31, 2018 at 5:17:56 PM UTC+5:30, Eric Sosman wrote:
> On 5/31/2018 6:07 AM, siddareddy.moolam@gmail.com wrote:
> > i have a folder with different files with different dates i need to get if one hour file is there or not,need to display file name
> > after that 1 day file need to displayed
> >
> > after 1 week file name should be displayed ..
> > Ex:
> >
> > 31-05-2018 folder inside filename is like these : 31-05-2018_10-42-25_rakesh_hike_load_608_output.txt if i need to enter 1 day details i need to display that file
>
> What difficulty are you having? Here are a few hints
> about possible solution steps:
>
> - To inspect the names of files and folders contained in
> another folder, start with a File object representing the
> container and use its list() or listFiles() method:
>
> File folder = new File("C:\\Users\\siddareddy\\folder");
> for (String name : folder.list())
> System.out.println(name);
> // ... or ...
> for (File child : folder.listFiles())
> System.out.println(child);
>
> - To convert the first part of a file name to a time stamp
> (so you can easily compare it to "Yesterday" or "Last week"),
> first separate the date-and-time portion from the rest:
>
> String name
> = "31-05-2018_10-42-25_rakesh_hike_load_608_output.txt";
> String prefix = "31-05-2018_10-42-25";
>
> ... then use a SimpleDateFormat to parse the prefix:
>
> DateFormat format = new SimpleDateFormat("dd-MM-yy_HH-mm-ss");
> Date stamp = format.parse(prefix);
>
> If this doesn't help you get started, please tell us more about
> the problems you are facing.
>
> --
> esosman@comcast-dot-net.invalid
> Nine hundred sixty-five days to go.
not working for me ........its displaying folders name only can you send me your mail id will send you full images
[toc] | [prev] | [next] | [standalone]
| From | Eric Douglas <e.d.programmer@gmail.com> |
|---|---|
| Date | 2018-05-31 06:52 -0700 |
| Message-ID | <81799c2d-0984-4274-aecf-c29ed06bbff1@googlegroups.com> |
| In reply to | #38308 |
On Thursday, May 31, 2018 at 8:59:59 AM UTC-4, siddared...@gmail.com wrote: > > not working for me ........its displaying folders name only can you send me your mail id will send you full images What's not working? sample code?
[toc] | [prev] | [next] | [standalone]
| From | Daniele Futtorovic <da.futt.news@laposte-dot-net.invalid> |
|---|---|
| Date | 2018-05-31 15:53 +0200 |
| Message-ID | <peouq9$l68$1@dont-email.me> |
| In reply to | #38308 |
On 2018-05-31 14:59, siddareddy.moolam@gmail.com wrote: > not working for me ........its displaying folders name only can you send me your mail id will send you full images (Oh my, was that a 'PLONK' I just heard echo over half the globe?) No Mr. Siddareddy, this is not how things work around here. If you're having problems, you need to describe them, in detail, as well as the code you're using. In public. Then you get solutions/hints/criticisms (assuming anyone can be bothered). In public as well. This approach, among other things, has the advantage that others can subsequently profit from the exchanges. If you don't like it, look somewhere else. -- DF.
[toc] | [prev] | [next] | [standalone]
| From | Eric Sosman <esosman@comcast-dot-net.invalid> |
|---|---|
| Date | 2018-05-31 10:08 -0400 |
| Message-ID | <peovkh$r6f$1@dont-email.me> |
| In reply to | #38308 |
On 5/31/2018 8:59 AM, siddareddy.moolam@gmail.com wrote:
> On Thursday, May 31, 2018 at 5:17:56 PM UTC+5:30, Eric Sosman wrote:
>> On 5/31/2018 6:07 AM, siddareddy.moolam@gmail.com wrote:
>>> i have a folder with different files with different dates i need to get if one hour file is there or not,need to display file name
>>> after that 1 day file need to displayed
>>>
>>> after 1 week file name should be displayed ..
>>> Ex:
>>>
>>> 31-05-2018 folder inside filename is like these : 31-05-2018_10-42-25_rakesh_hike_load_608_output.txt if i need to enter 1 day details i need to display that file
>>
>> What difficulty are you having?
>> [...]
>
> not working for me ........its displaying folders name only can you send me your mail id will send you full images
>
One skill every programmer must cultivate is the ability to
formulate a careful and complete description of a problem. When
you have mastered that skill -- or when you have even begun to
demonstrate that you are trying to learn it -- somebody will
surely try to help you. Until then ...
"Doctor, it hurts!"
"What hurts?"
"Just hurry up and cure me!"
--
esosman@comcast-dot-net.invalid
Nine hundred sixty-five days to go.
[toc] | [prev] | [next] | [standalone]
| From | msr2858@gmail.com |
|---|---|
| Date | 2018-05-31 22:02 -0700 |
| Message-ID | <99181ebf-320d-4c54-98b8-4dec13652ea2@googlegroups.com> |
| In reply to | #38311 |
On Thursday, May 31, 2018 at 7:38:28 PM UTC+5:30, Eric Sosman wrote:
> On 5/31/2018 8:59 AM, siddareddy.moolam@gmail.com wrote:
> > On Thursday, May 31, 2018 at 5:17:56 PM UTC+5:30, Eric Sosman wrote:
> >> On 5/31/2018 6:07 AM, siddareddy.moolam@gmail.com wrote:
> >>> i have a folder with different files with different dates i need to get if one hour file is there or not,need to display file name
> >>> after that 1 day file need to displayed
> >>>
> >>> after 1 week file name should be displayed ..
> >>> Ex:
> >>>
> >>> 31-05-2018 folder inside filename is like these : 31-05-2018_10-42-25_rakesh_hike_load_608_output.txt if i need to enter 1 day details i need to display that file
> >>
> >> What difficulty are you having?
> >> [...]
> >
> > not working for me ........its displaying folders name only can you send me your mail id will send you full images
> >
>
> One skill every programmer must cultivate is the ability to
> formulate a careful and complete description of a problem. When
> you have mastered that skill -- or when you have even begun to
> demonstrate that you are trying to learn it -- somebody will
> surely try to help you. Until then ...
>
> "Doctor, it hurts!"
>
> "What hurts?"
>
> "Just hurry up and cure me!"
>
> --
> esosman@comcast-dot-net.invalid
> Nine hundred sixty-five days to go.
Problem:
IAm able to get one day files but i didnt get one hour and one week files could please help me
Thanks!
Sidda
FDate.java:
package hellomongo;
import java.io.File;
import java.text.SimpleDateFormat;
import java.util.Date;
public class FDate {
String stringToday1;
String path;
String base="/home/msr/hike/";
public void getdayfilnames() {
Date today1 = new Date();
System.out.println("today1 :: " + today1);
// let us convert different formats of today1 into strings
SimpleDateFormat sdf1 = new SimpleDateFormat("dd-MM-yyyy");
stringToday1 = sdf1.format(today1);
System.out.println("today1 :: " + stringToday1);
path=base+stringToday1;
System.out.println("dayysss:"+ path);
File folder = new File(path);
File[] listOfFiles = folder.listFiles();
for (int i = 0; i < listOfFiles.length; i++) {
if (listOfFiles[i].isFile()) {
String fname=listOfFiles[i].getName();
System.out.print(" "+fname+" ");
}
/*if (listOfFiles[i].isFile()) {
String fname=listOfFiles[i].getName();
System.out.println(" fname :"+fname);
String dayfile=fname.substring(1, 10);
if(day==dayfile) {
System.out.println(fname);
}
} */
}
}
}
main Method:
package hellomongo;
import java.io.File;
import java.io.FilenameFilter;
import java.text.DateFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
public class Timedate {
public static void main(String[] args)
{
Timedate td=new Timedate();
FDate fd=new FDate();
fd.getdayfilnames();
}
}
Excepted Output:
dayysss:/home/msr/hike/01-06-2018:
31-05-2018_10-42-25_rakesh_hike_load_608_output.txt
31-05-2018_10-42-38_rakesh_hike_cpu_bd7_output.txt
31-05-2018_10-42-46_rakesh_hike_ram_d8c_output.txt
[toc] | [prev] | [next] | [standalone]
| From | msr2858@gmail.com |
|---|---|
| Date | 2018-05-31 22:08 -0700 |
| Message-ID | <b983ee39-50f0-4501-a9bf-c4fcf0703693@googlegroups.com> |
| In reply to | #38311 |
On Thursday, May 31, 2018 at 7:38:28 PM UTC+5:30, Eric Sosman wrote:
> On 5/31/2018 8:59 AM, siddareddy.moolam@gmail.com wrote:
> > On Thursday, May 31, 2018 at 5:17:56 PM UTC+5:30, Eric Sosman wrote:
> >> On 5/31/2018 6:07 AM, siddareddy.moolam@gmail.com wrote:
> >>> i have a folder with different files with different dates i need to get if one hour file is there or not,need to display file name
> >>> after that 1 day file need to displayed
> >>>
> >>> after 1 week file name should be displayed ..
> >>> Ex:
> >>>
> >>> 31-05-2018 folder inside filename is like these : 31-05-2018_10-42-25_rakesh_hike_load_608_output.txt if i need to enter 1 day details i need to display that file
> >>
> >> What difficulty are you having?
> >> [...]
> >
> > not working for me ........its displaying folders name only can you send me your mail id will send you full images
> >
>
> One skill every programmer must cultivate is the ability to
> formulate a careful and complete description of a problem. When
> you have mastered that skill -- or when you have even begun to
> demonstrate that you are trying to learn it -- somebody will
> surely try to help you. Until then ...
>
> "Doctor, it hurts!"
>
> "What hurts?"
>
> "Just hurry up and cure me!"
>
> --
> esosman@comcast-dot-net.invalid
> Nine hundred sixty-five days to go.
Problem:
iam able to get one day files but i didnt get one hour and one week files could you please help me
calling method:
package hellomongo;
import java.io.File;
import java.text.SimpleDateFormat;
import java.util.Date;
public class FDate {
String stringToday1;
String path;
String base="/home/msr/hike/";
public void getdayfilnames() {
Date today1 = new Date();
System.out.println("today1 :: " + today1);
// let us convert different formats of today1 into strings
SimpleDateFormat sdf1 = new SimpleDateFormat("dd-MM-yyyy");
stringToday1 = sdf1.format(today1);
System.out.println("today1 :: " + stringToday1);
path=base+stringToday1;
System.out.println("dayysss:"+ path);
File folder = new File(path);
File[] listOfFiles = folder.listFiles();
for (int i = 0; i < listOfFiles.length; i++) {
if (listOfFiles[i].isFile()) {
String fname=listOfFiles[i].getName();
System.out.print(" "+fname+" ");
}
/*if (listOfFiles[i].isFile()) {
String fname=listOfFiles[i].getName();
System.out.println(" fname :"+fname);
String dayfile=fname.substring(1, 10);
if(day==dayfile) {
System.out.println(fname);
}
} */
}
}
}
Main Method:
package hellomongo;
import java.io.File;
import java.io.FilenameFilter;
import java.text.DateFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
public class Timedate {
public static void main(String[] args)
{
Timedate td=new Timedate();
FDate fd=new FDate();
fd.getdayfilnames();
}
}
Output for oneday files:
dayysss:/home/msr/hike/31-05-2018:
31-05-2018_10-42-25_rakesh_hike_load_608_output.txt
31-05-2018_10-42-38_rakesh_hike_cpu_bd7_output.txt
31-05-2018_10-42-46_rakesh_hike_ram_d8c_output.txt
[toc] | [prev] | [next] | [standalone]
| From | Eric Sosman <esosman@comcast-dot-net.invalid> |
|---|---|
| Date | 2018-06-01 07:43 -0400 |
| Message-ID | <perbht$q3n$1@dont-email.me> |
| In reply to | #38325 |
On 6/1/2018 1:08 AM, msr2858@gmail.com wrote:
>
> Problem:
> iam able to get one day files but i didnt get one hour and one week files could you please help me
It might help if you explained exactly what "one hour files" and
"one week files" are. Hint, hint.
> package hellomongo;
>
> import java.io.File;
> import java.text.SimpleDateFormat;
> import java.util.Date;
>
> public class FDate {
> String stringToday1;
> String path;
> String base="/home/msr/hike/";
>
> public void getdayfilnames() {
> Date today1 = new Date();
> System.out.println("today1 :: " + today1);
> // let us convert different formats of today1 into strings
> SimpleDateFormat sdf1 = new SimpleDateFormat("dd-MM-yyyy");
> stringToday1 = sdf1.format(today1);
> System.out.println("today1 :: " + stringToday1);
>
> path=base+stringToday1;
> System.out.println("dayysss:"+ path);
I observe that this statement could not possibly produce the
output you claim (below). I therefore conclude that your report
of "Here's what I did and here's what happened" is incorrect.
> File folder = new File(path);
> File[] listOfFiles = folder.listFiles();
>
>
> for (int i = 0; i < listOfFiles.length; i++) {
> if (listOfFiles[i].isFile()) {
> String fname=listOfFiles[i].getName();
>
>
>
> System.out.print(" "+fname+" ");
Same remark: This statement could not possibly have produced the
output you reported. You are lying to us -- perhaps innocently, but
you are lying nonetheless.
> }
>
>
> /*if (listOfFiles[i].isFile()) {
> String fname=listOfFiles[i].getName();
> System.out.println(" fname :"+fname);
> String dayfile=fname.substring(1, 10);
> if(day==dayfile) {
> System.out.println(fname);
> }
> } */
> }
>
>
> }
> }
> package hellomongo;
>
> import java.io.File;
> import java.io.FilenameFilter;
> import java.text.DateFormat;
> import java.text.ParseException;
> import java.text.SimpleDateFormat;
> import java.util.Date;
>
> public class Timedate {
>
> public static void main(String[] args)
> {
>
> Timedate td=new Timedate();
Why bother with this? It burns a few CPU cycles, chews
up a little bit of memory, and accomplishes nothing useful.
> FDate fd=new FDate();
> fd.getdayfilnames();
>
> }
> }
> Output for oneday files:
... except this is not the actual output, not from the code
you've shown at any rate.
> dayysss:/home/msr/hike/31-05-2018:
> 31-05-2018_10-42-25_rakesh_hike_load_608_output.txt
> 31-05-2018_10-42-38_rakesh_hike_cpu_bd7_output.txt
> 31-05-2018_10-42-46_rakesh_hike_ram_d8c_output.txt
Others may (or may not) be more patient with you, but I for
one will offer no further help until:
1) You define *precisely* what is meant by "one day files",
"one hour files" and "one week files,"
2) You explain in more detail where the various files reside
and in what folders,
3) You exhibit code and output (or error messages) that *match*.
--
esosman@comcast-dot-net.invalid
Nine hundred sixty-four days to go.
[toc] | [prev] | [next] | [standalone]
| From | msr2858@gmail.com |
|---|---|
| Date | 2018-06-01 04:57 -0700 |
| Message-ID | <0c9ce9ea-7eef-403b-b1cc-6487d315af7c@googlegroups.com> |
| In reply to | #38305 |
On Thursday, May 31, 2018 at 3:37:14 PM UTC+5:30, siddared...@gmail.com wrote: > i have a folder with different files with different dates i need to get if one hour file is there or not,need to display file name > after that 1 day file need to displayed > > after 1 week file name should be displayed .. > Ex: > > 31-05-2018 folder inside filename is like these : 31-05-2018_10-42-25_rakesh_hike_load_608_output.txt if i need to enter 1 day details i need to display that file in my home folder there are is one parent folder called Hike inside there are multiple folders with different dates as mentioned in below attached if i need to track one hour,one day,one week date folders i need to display files inside a folders .. need to display in files : Input: Folder :28-05-2018: inside FIles:28-05-2018_11-41-38_rakesh_hike_hc_393_output.txt
[toc] | [prev] | [next] | [standalone]
| From | msr2858@gmail.com |
|---|---|
| Date | 2018-06-01 04:58 -0700 |
| Message-ID | <50cf2923-3dc2-4251-a9cc-1c66d6bab2b1@googlegroups.com> |
| In reply to | #38305 |
On Thursday, May 31, 2018 at 3:37:14 PM UTC+5:30, siddared...@gmail.com wrote: > i have a folder with different files with different dates i need to get if one hour file is there or not,need to display file name > after that 1 day file need to displayed > > after 1 week file name should be displayed .. > Ex: > > 31-05-2018 folder inside filename is like these : 31-05-2018_10-42-25_rakesh_hike_load_608_output.txt if i need to enter 1 day details i need to display that file am not able attach images of my file directory ..could you please understand my problem
[toc] | [prev] | [next] | [standalone]
| From | msr2858@gmail.com |
|---|---|
| Date | 2018-06-01 05:00 -0700 |
| Message-ID | <54a52822-55e3-4dea-9661-9f6cef3c4bf3@googlegroups.com> |
| In reply to | #38305 |
On Thursday, May 31, 2018 at 3:37:14 PM UTC+5:30, siddared...@gmail.com wrote: > i have a folder with different files with different dates i need to get if one hour file is there or not,need to display file name > after that 1 day file need to displayed > > after 1 week file name should be displayed .. > Ex: > > 31-05-2018 folder inside filename is like these : 31-05-2018_10-42-25_rakesh_hike_load_608_output.txt if i need to enter 1 day details i need to display that file For one day time span it is working for me ..but one hour and one week its not working..
[toc] | [prev] | [next] | [standalone]
| From | Daniele Futtorovic <da.futt.news@laposte-dot-net.invalid> |
|---|---|
| Date | 2018-06-01 16:08 +0200 |
| Message-ID | <perk2r$itk$1@dont-email.me> |
| In reply to | #38329 |
On 2018-06-01 14:00, msr2858@gmail.com wrote:
> On Thursday, May 31, 2018 at 3:37:14 PM UTC+5:30, siddared...@gmail.com wrote:
>> i have a folder with different files with different dates i need to get if one hour file is there or not,need to display file name
>> after that 1 day file need to displayed
>>
>> after 1 week file name should be displayed ..
>> Ex:
>>
>> 31-05-2018 folder inside filename is like these : 31-05-2018_10-42-25_rakesh_hike_load_608_output.txt if i need to enter 1 day details i need to display that file
>
> in my home folder there are is one parent folder called Hike inside there are multiple folders with different dates as mentioned in below attached if i need to track one hour,one day,one week date folders i need to display files inside a folders .. need to display in files :
>
> Input:
> Folder :28-05-2018: inside
> FIles:28-05-2018_11-41-38_rakesh_hike_hc_393_output.txt
>
>
> For one day time span it is working for me ..but one hour and one week its not working..
>
Please try to collect your various postings into one -- USENET doesn't
lend itself to chat.
Compared to the code you posted, I would suggest:
1. That you parse both the date and the hour in the filename (you
seemed to only parse the date);
2. That you use the objects from the java.time package (e.g.
java.time.LocalDateTime) instead of the (essentially deprecated)
java.util.Date;
3. That you put every file you find into a java.util.NavigableMap (e.g.
TreeMap) with the LocalDateTime you parsed as the key and the File as
the value;
4. Then, when you have built that map with all the files in your
directory, you can search the map according to some input.
Sample code (not compiled) for item #4:
NavigableMap<Temporal, File> indexedFiles;
LocalDateTime reference = ...;
//Files in the hour of 'reference'
LocalDateTime hourStart =
reference.withMinute(0).withSecond(0).withNanos(0);
LocalDateTime hourEnd = hourStart.plusHours(1);
System.err.printf("Files in current hour (%s->%s):%n", hourStart, hourEnd);
indexedFiles.subMap(hourStart, true, hourEnd, false).forEach( (time,
file) -> System.err.println(file.getAbsolutePath()) );
//Files in the day of 'reference'
LocalDateTime dayStart = reference.truncatedTo(ChronoUnit.DAYS);
LocalDateTime dayEnd = dayStart.plusDays(1);
System.err.printf("Files in current day (%s->%s):%n", dayStart, dayEnd);
indexedFiles.subMap(dayStart, true, dayEnd, false).forEach( (time,
file) -> System.err.println(file.getAbsolutePath()) );
//Files in the week of 'reference' is left as an exercise to the reader.
//Cf. LocalDateTime#with(TemporalAdjuster) and
TemporalAdjusters#previousOrSame et al.
--
DF.
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.java.programmer
csiph-web