timestamp_to_string

Creator: coderz1093

Last updated:

0 purchases

TODO
Add to Cart

Description:

timestamp to string

Timestamp-to-date Converter #
Timestamp-to-Readable-String-Converter #
Description #
A timestamp to readable string or timestamp to date converter is a function that takes a timestamp as input and returns a human-readable date string in a specific format (such as "DayName, MonthName Date, Year"). This is useful for presenting timestamps in a more user-friendly way, and can be customized to match a variety of date and time formats.
Screenshots #

Installation #
To use this package, add timestamp_to_string as a dependency in your pubspec.yaml file.
Example #
import 'package:flutter/material.dart';
import 'package:timestamp_to_string/timestamp_to_string.dart';


class Example extends StatefulWidget {
@override
_ExampleState createState() => _ExampleState();
}
class _ExampleState extends State<Example> {
@override
Widget build(BuildContext context) {
returnScaffold(
appBar: AppBar(
title: const Text('Timestamp to string example'),
),
body: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
// Current time
Center(child: CurrentTimeToString.now()),

/// 2019-01-01 12:00:00

// Specific timestamp, in a specific format
Center(child: TimestampToString.dddmmmddyyyy('1546300800')),

/// Wed, Jan 01, 2019
],
),
),
);
}
}
copied to clipboard
Parameters #
TimestampToString #
provide a timestamp in seconds in string format
TimestampToString.dddmmmddyyyy('$timestamp') // Wed, Jan 01, 2019

TimestampToString.yyyymmddhhmmss(timestamp.toString()) // 2019/01/01 12:00:00
copied to clipboard
Usage formate #



Format
Description




.ddmmyyyy
01/01/2019


.yyyymmdd
2019/01/01


.yyyymmddhhmmss
2019/01/01 12:00:00


.ddmmyyyyhhmmss
01/01/2019 12:00:00


.dddmmmddyyyy
Wed, Jan 01, 2019


.noFormater
February 24, 2021 7:16:40 AM


.now
February 24, 2021 7:16:40 AM



Usage #
TimestampToString.now() // February 24, 2021 7:16:40 AM
copied to clipboard
TimestampToString.ddmmyyyy('$timestamp') // 01/01/2019
copied to clipboard
TimestampToString.yyyymmdd('$timestamp') // 2019/01/01
copied to clipboard
TimestampToString.yyyymmddhhmmss('$timestamp') // 2019/01/01 12:00:00
copied to clipboard
TimestampToString.ddmmyyyyhhmmss('$timestamp') // 01/01/2019 12:00:00
copied to clipboard
TimestampToString.dddmmmddyyyy('$timestamp') // Wed, Jan 01, 2019
copied to clipboard
TimestampToString.noFormater('$timestamp') // February 24, 2021 7:16:40 AM
copied to clipboard
CurrentTimeToString #
CurrentTimeToString.now() // February 24, 2021 7:16:40 AM
copied to clipboard
Usage formate #



Format
Description




.ddmmyyyy
01/01/2019


.yyyymmdd
2019/01/01


.yyyymmddhhmmss
2019/01/01 12:00:00


.ddmmyyyyhhmmss
01/01/2019 12:00:00


.dddmmmddyyyy
Wed, Jan 01, 2019


.noFormater
February 24, 2021 7:16:40 AM


.now
February 24, 2021 7:16:40 AM



Usage #
CurrentTimeToString.ddmmyyyy() // 01/01/2019
copied to clipboard
CurrentTimeToString.yyyymmdd() // 2019/01/01
copied to clipboard
CurrentTimeToString.yyyymmddhhmmss() // 2019/01/01 12:00:00
copied to clipboard
CurrentTimeToString.ddmmyyyyhhmmss() // 01/01/2019 12:00:00
copied to clipboard
CurrentTimeToString.dddmmmddyyyy() // Wed, Jan 01, 2019
copied to clipboard
CurrentTimeToString.noFormater() // February 24, 2021 7:16:40 AM
copied to clipboard
CurrentTimeToString.now() // February 24, 2021 7:16:40 AM
copied to clipboard
Github Repository #
Author #
Shubham Kumar - Github
Also See #



Package
Description




Single Text Field
A Flutter package for creating a single text field.


Drop Down List Menu
A Flutter package for creating a drop down list menu.


dad Jokes
A Flutter package for getting dad jokes.

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.