Here you can find the source of calendarOutput(Calendar date)
Parameter | Description |
---|---|
date | Datum, welches aus gegeben werden soll |
public static String calendarOutput(Calendar date)
//package com.java2s; /*/*from ww w . jav a 2 s.c o m*/ * * Copyright (c) 2011 by Jgility Development Group * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * Karsten Schulz * */ import java.text.SimpleDateFormat; import java.util.Calendar; public class Main { /** * Generiert eine Zeichenkette-Ausgabe im Format "dd.MM.yyyy" * * @param date Datum, welches aus gegeben werden soll * @return einen Formatierte Datumsausgabe in Form von "dd.MM.yyyy" */ public static String calendarOutput(Calendar date) { SimpleDateFormat sdf = new SimpleDateFormat("dd.MM.yyyy"); return sdf.format(date.getTime()); } }