Example #1
0
  private void saveStartProjects(File file) throws IOException {
    Calendar cal = Calendar.getInstance();

    try (PrintWriter out = new PrintWriter(file, "windows-1251")) {
      for (Region region : this.regions) {
        cal.setTime(region.start);

        out.write("\"");
        out.write(region.filial + " " + region.name);
        out.write("\";;;");

        int skeepCells = (cal.get(Calendar.YEAR) - 2017) * 5 + (cal.get(Calendar.MONDAY) % 4);
        for (int i = 0; i < skeepCells; i++) {
          out.write(";");
        }
        out.println("X");
      }
    }
  }