cdts/xdts-ios 3/TreeHole/Code/Gategory/NSDateDeal/NSDateDeal.h
2023-07-27 09:20:00 +08:00

62 lines
1.9 KiB
Objective-C
Executable File
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

//
// NSDateDeal.h
// moneyshield
//
// Created by striveliu on 15/6/24.
// Copyright (c) 2015年 Alibaba.inc. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface NSDateDeal : NSObject
+ (int)dateInterval:(NSDate *)aStartDate endDate:(NSDate *)aEndDate;
+ (int)getDateInterval:(NSDate *)aStartDate endDate:(NSDate *)aEndDate;
+ (NSInteger)getCurrentYear;
+ (NSInteger)getCurrentMonth;
+ (NSInteger)getCurrentDay;
+ (NSInteger)getYear:(long long)aTimerInterval;
+ (NSInteger)getMonth:(long long)aTimerInterval;
+ (NSInteger)getDay:(long long)aTimerInterval;
//HH:mm yyyy-MM-dd
+ (NSString *)formateTimerInterval:(long long)aTimerInterval formate:(NSString *)aFormate;
+ (NSString*)showTime:(NSTimeInterval) msglastTime showDetail:(BOOL)showDetail;
+ (NSTimeInterval)getCurrentTimeInterval;
// 默认时间格式显示(用于个人中心、动态模块的时间显示)
/*
1分钟内显示“刚刚" ;
1分钟-60分钟显示"x分前“;
超过60分钟显示时-分格式“15:02”;
超过当天,显示昨天 时-分,格式"昨天13:30" ;
超过昨天,显示月-日-时-分,格式"11-5 13:30";
超过当年,显示年-月-日,格式"2018-11-5"
*/
+ (NSString *)showDefalutFormateTime:(long long)timestamp;
// 聊天列表时间
/**
当天显示具体时间,格式"10:30"; 超过24小时显示昨天超过48小时显示月日,格式"11-5",非当年显示年月日,格式“2018-11-5”
*/
+ (NSString *)showChatListFormateTime:(long long)timestamp;
// 聊天房内时间显示
/**
显示时-分格式“15:02”; 超过当天,显示昨天 时-分,格式"昨天13:30" ; 超过昨天,显示月-日-时-分,格式"11-5 13:30" ; 超过当年,显示年-月-日,格式"2018-11-5"
*/
+ (NSString *)showChatRoomFormateTime:(long long)timestamp;
/// 显示客人态动态打卡显示
+ (NSString *)showOtherPunchFormateTime:(long long)timestamp;
@end